Disable all Validator elements on the page.
5 answers
Set up javascript to get all validation elements in your page and set them to false in a for loop, something like this will work
function DisablePageValidators()
{
if ((typeof(Page_Validators) != "undefined") && (Page_Validators != null))
{
var i;
for (i = 0; i < Page_Validators.length; i++) {
ValidatorEnable(Page_Validators[i], false);
}
}
}
+4
source to share
Your best bet is to recursively iterate over all the controls on the page, looking for all controls that inherit from the BaseValidator class , and then set the property to a Enabled
value False
. You can write this as a simple library method.
+1
source to share