This is my first asp.net application and it looks like I am in a rock and a hard place. I have a multi page formview and I want to allow the user to page back with causing validation, but if I don't cause validation on the page back button, I get an error Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control that has CausesValidation=True and initiated the postback, or after a call to Page.Validate.Source Error:
Line 41: Line 42: Protected Sub FormView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewPageEventArgs) Handles FormView1.PageIndexChangingLine 43: FormView1.UpdateItem(True)Line 44: If FormView1.PageIndex < 1 ThenLine 45: FormView1.FindControl("ImpactsTextBox").Focus() Line 43 in the vb file allows me to update an item. How do I get around this problem? Is this where I need a "if not postback"? Any examples would be appreciated.
View Complete Post