1.Client check:
First, configure the client check. Javascript Script library, Webuivalidation. js . Install script Library: Aspnet_regiis-C, Uninstall script Library : Aspnet_regiis-e .
Disable client check:<% @ Page clienttarget = "downlevel">
2.Verification required---- Requriedfielevalidator:
Isvalid: Whether the test is passed, yes -True, No -False; You can check controls or pages. Only all verification controls Isvalid Is True, page. isvalid Only True.
Initialvalue: Control initial value. Compare with the initial value: for example, the start text box displays" Enter data To check whether other values are input, you can use Initialvalue = " Enter data ", And then use Isvalid Judgment.
3.Regular Expression Verification:Regularexpressionvalidator
Text:Error message;
Errormessage: validationsummaryError message displayed. IfTextIf it is null, the property value is displayed.
Verification Email:\ S + @ \ s + \. \ s {2, 3}
Verification password and User name: letters, numbers, underscores (_), limited length:\ W {8, 20}
URL:Http // + \ s + \. \ s +
0-10Non-space characters:\ S {0, 10}
4.Comparison value:Comparevalidator
You can compare two controls or controls with fixed values.
Identifiable type: SetOperatorSetDatatypecheck, And thenTypeSet to date and other types.
5.Custom checkCustomervalidator
OnservervalidateAdd custom validation events, where event parametersEIncludingIsvalidAndValueTwo parameters.
6.Disable inspection:
If you click"Cancel"Button, you canCausevalidationSet propertyFalse.