ASP.NET proceeds to form verification 1. ASPX files are compiled, run
2. User input data
3. Trigger Page_Load Event
4. Change the Web Control Properties, no input
5. Return the page with HTML to the user
6. Remind the user again
Page_load process
Page objects contain some important properties and methods related to server-side verification. The following table lists all Collect and Methed of the Page_Load property.
Page_Load method name Description Isvalid (most often) This is the most useful attribute. This property can check if the entire form is valid. This check is usually performed before updating the database. Only all objects in the Validators set are all valid, this property is true and does not store this value into the cache. Validators This page All validation objects are set. This is a collection of objects that implement the IVALIDATOR interface. Validate is called when verifying. The default execution method on the PAGE object is to each validator and require each verifier to evaluate it.
Verifier (Web Control) used to verify the form
RequiredFieldValidator Checks the user if the user enters or selects the regular expression to check the user input according to the rule expression. This process allows many types of inspections that can be used for postal coding and telephone numbers. CompareValidator compares the input control with a fixed value or another input control. For example, it can be used in the password verification field. It can also be used to compare the date and numbers of the input. RangeValidator is very similar to CompareValidator, just it is used to check if the input is between two values or other input controls. CustomValidator allows users to write their own code to join in the verification framework