I have a huge form with many RequiredFieldValidators, how can I programmatically determine which control is setting the IsValid property of the Page to false?
I have a huge form with many RequiredFieldValidator s, how can I programmatically determine
Share
On the server side, you can look at the
Validatorsproperty to find all theIValidatorinstances. Then, you just test which one(s) are not.IsValid.On the client side, it’s similar. There’s a JavaScript array
Page_Validators, and each one has aisvalidproperty.