RequiredFieldValidator

  • Thread starter Thread starter IT
  • Start date Start date
I

IT

Hi
Anybody knows how to enable or diasable requiredfieldvalidator by using
javascript. I need enable validators ony by clicking Submit button, not all
time.
Mac
 
IT,

you could loop through Page_Validators array and change enabled property,
something like:

if (typeof(Page_Validators) != 'undefined')
for (var i=0; i<Page_Validators.length; i++)
Page_Validators.enabled = yourEnableVariable;
 
You can set the CausesValidation property to false on any buttons that are
not your submit buttons.
 
Back
Top