Ioninesleesse
New Member
Hi all,<BR><BR>I get this error message:<BR><BR>Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control with CausesValidation=True or after a call to Page.Validate. <BR><BR>The code:<BR><BR>If Page.IsPostBack Then<BR> If Page.IsValid Then<BR> Response.Write("Page is valid.")<BR> Else<BR> Dim objValidator As IValidator<BR> For Each objValidator In Validators<BR> If NOT objValidator.IsValid Then<BR> Response.Write(objValidator.ErrorMessage & "<BR>")<BR> End If<BR> Next<BR> End If<BR>Else<BR>'page steup code<BR>End If<BR><BR>Can someone tell me what is causing this error?<BR><BR>Thanks,<BR>D.Where is this code appearing? It should be in a server-side event handler, as the instructions indicate, such as in the Page_Load event handler...Yes, the code appears in the Page_Load event handler.