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.
+2
A:
Simply use this JavaScript function
function Disable()
{
var myVal = document.getElementById('myValidatorClientID');
ValidatorEnable(myVal, false);
}
Muhammad Akhtar
2010-09-15 13:03:49
@Muhammad, where would I call the Disable function?
user279521
2010-09-15 13:07:11
you can use textbox onblur event and you need to call this on txtFieldA
Muhammad Akhtar
2010-09-15 13:13:42
A:
Override Page.Validate()
or Page.Validate(string)
to change the default validation policy.
onof
2010-09-15 13:04:39