开发者

Disable validation controls based on a condition

I have an asp.net application that uses validation controls on textboxes. However,开发者_开发技巧 if the user enters a value in txtFieldA, then I want to disable the validation controls on txtFieldB and txtFieldC.


Simply use this JavaScript function

function Disable()
{
  var myVal = document.getElementById('myValidatorClientID');
  ValidatorEnable(myVal, false);  
}


Override Page.Validate() or Page.Validate(string) to change the default validation policy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜