on page 522
After writing the code below
If (e.Entity IsNot Nothing) Then
Dim myPhotoAlbum As PhotoAlbum = CType(e.Entity, PhotoAlbum)
Response.Redirect(String.Format("ManagePhotoAlbum. aspx?PhotoAlbumId={0}",
myPhotoAlbum.Id.ToString()))
When I run the page and Insert the Item I don't get redirected but get an error saying:
Unable to cast object of type PlanetWroxModel.PhotoAlbum to type PhotoAlbum
Why is this??????
|