Posted on: 6/23/2014 6:03:50 PM | Views : 425

when the DetailsView Insert button is clicked, this code checks to see if there is an email in other records, and if there is, then it cancels and Label1 displays "That Email is already registered".  So far it works.  The only problem is the DetailsView is in View 1 of the Multiview.  After the code executes, View 0 becomes the active view.  I can't figure out how to keep View 1 active?
Protected Sub SqlDataSource2_Inserting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles SqlDataSource2.Inserting Dim ConnectionString As String = ConfigurationManager.ConnectionStrings("LocalSqlServer").ConnectionString() Dim checkSql As String = "SELECT Members.MemEmail, Members.MemId, Members.MemFirstName, Members.MemLastName FROM Members WHERE Members.MemEmail = @MemEmail" Dim myEmail As String = DetailsView1.Fields.Item(5).ToString Us ...

Go to the complete details ...