1, non-null data validation control Requiredfiledvalidator.
Properties: Controltovaliata refers to which control the validation control validates. For example, verify that the ID property of the TextBox control Txtpwd, as long as the requiredfiledvalidator. The Controltovalidata property of the control is set to Txtpwd. Code: this. Requiredfiledvalidator1.controltovalidata= "Txtpwd";
ErrorMessage property: Used to specify the error message text that is displayed when the Requiredfiledvalidator control is used in a page. Code: this. Requeiredfiledvalidator1.errormessage= "*";
2. Data Comparison validation control
CompareValidator:
Important property: ControlToCompare Specifies the control ID for which you want to compare values. For example, verify two-time IDs.
This.comparevalidator1.controltocompare= "Txtpwd";
This.comparevalidator1.controltovalidate= "" Txtrepwd:
Operator property: The action that is performed when validation occurs. For example, verify that the input password and re-enter the password are consistent.
this.comparevalidator1.operator=validationcompareoperator.equal;
Type property: Specifies the data type of the two values to be compared, such as verifying the data type of both
This ..... type=validationdatatype.string;
ValueToCompare Property: Specifies the value to compare.
<title> Data validation Technology </title>
3. Data type validation control
CompareValidator validates the user's input against a specific data type to ensure that the user enters a number or a date.
Example: The control properties used, Cotroltovalidator, operator, type properties. Verify that the birth date entered by the user matches the type.
A demonstration of the fading effect of jquery.