Thank you for your continued time and assistance. I fixed the where clause, as directed, but now a new error is thrown:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Source Error:
Line 4: Inherits System.Web.UI.Page
Line 5:
Line 6: Protected Sub EntityDataSource_Inserting(sender As Object, e As System.Web.UI.WebControls.EntityDataSourceChanging EventArgs) Handles EntityDataSource1.Inserting
Line 7: Dim photoAlbumId As Integer =
Line 8: Convert.ToInt32(Request.QueryString.Get("PhotoAlbu mId"))
Source File: C:\BegASPNET\Source\Chapter 07\ManagePhotoAlbum.aspx.
vb Line: 6
The code for ManagePhotoAlbum.aspx.
vb reads:
Code:
Imports PlanetWroxModel
Partial Class ManagePhotoAlbum
Inherits System.Web.UI.Page
Protected Sub EntityDataSource_Inserting(sender As Object, e As System.Web.UI.WebControls.EntityDataSourceChangingEventArgs) Handles EntityDataSource1.Inserting
Dim photoAlbumId As Integer =
Convert.ToInt32(Request.QueryString.Get("PhotoAlbumId"))
Dim myPicture As Picture = CType(e.Entity, Picture)
myPicture.PhotoAlbumID = photoAlbumId
End Sub
End Class
Any ideas? Again, thanks so much. Shane