In ASP.NET selectively validate form input line

BS, validation controls how javascript which control the effectiveness of
javascript two functions can be used directly
Page_Validators: a current page of all verification control array is formed, can be used to recycle
ValidatorEnable (val, enable): This method the validation controls as a pass parameters, enable or disable the control uses authentication, the client put that role
Page_IsValid: a javascript bool variable, all input indicates whether pages are legitimate
Page_ValidationActive: a Boolean value indicating whether validation function, is set to false then turn off all authentication page
isvalid: enter the property to verify the legality of the client, is a Boolean value

Two code examples:

None.gif <script language = " javascript "
None.gif
for (i = 0 ;i< Page_Validators.length;i ++
ExpandedBlockStart.gifContractedBlock.gif
dot.gif
InBlock.gif ValidatorEnable(Page_Validators[i], 
false
ExpandedBlockEnd.gif}
 
None.gif
/ script> 
None.gif
This is the cycle following the direct control of a single validation control
None.gif < script language = " javascript " >
None.gif ValidatorEnable(ValidatorName, 
false
None.gif
</ script >
Note that in ValidatorName ValidatorEnable not enclosed in quotation marks, tape marks will not work.

Reproduced in: https: //www.cnblogs.com/baoposhou/archive/2006/04/12/373037.html

Guess you like

Origin blog.csdn.net/weixin_33860147/article/details/93320716