"Unable to call the page.issalid problem before verification" problem

xiaoxiao2021-03-06  21

In ASP.NET, in order to facilitate the verification of the form, verification controls are provided to complete the verification of the form input data. These verification controls are indeed powerful, providing great convenience for write form programs. However, in unfamiliar cases, problems often encounter. Among them, the most common thing is to encounter an error: Page.issalid cannot be called before the verification occurs.

I think that many friends have been "in-depth contact asp.net" book. This book is very popular among netizens, and it is indeed a good entry, but there are also some, such as here. When the book discusses the verification component, the use of the RequiredFieldValidator, there is such a program:

RequiredFieldValidator.aspx:

<% @ Page language = "c #"%>