Data verification and excel Data Verification
Data verification control
-- Heart
When performing form data verification in ASP, developers must write a set of validation rules and copy the code to ASP code to verify the form. This verification method is not very convenient. Fortunately, ASP. NET solves this problem, which is the data verification Web control.
The data verification control is a control used by ASP. NET to verify the input of form users. For example, RequiredFieldValidation is a control specifically used to verify whether a user has already entered the input. Using this control ensures that the user must have entered a form item (such as a data input box) of the form ). In addition, ASP. NET also provides the following data verification controls.
1. RequiredFieldValidator: Check whether the user inputs
ControlToValidate |
Used to verify the ID |
ErrorMessage |
Displays messages when a control error occurs. |
Text |
Show error message content |
2. CompareValidator: checks the comparison between the input value and another value.
ControlToCompare |
ID of the control to be compared |
ControlToValidate |
Verification Control ID |
ErrorMessage |
Displays messages when a control error occurs. |
3. RangeValidator: checks whether user input is within a specified range.
ControlToValidate |
Used to verify the ID |
ErrorMessage |
Displays messages when a control error occurs. |
MaximumValue |
Maximum Value of the specified domain |
MinimumValue |
Minimum value of the specified domain |
4. ValidationSummary: to display the ErrorMessage attribute of the Web control that has not been verified. Therefore, before using the ValidatorSummary Web control, you must set the ErrorMessage for other Web control verification.
HeadText |
Display the text of the header, such as an error. |
ShowMessageBox |
True dialog box |
ShowSummary |
Used to use or disable error messages |