Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run custom Javascript whenever a client-side ASP.NET validator is triggered?

Is there a way to run some custom Javascript whenever a client-side ASP.NET validator (RequiredFieldValidator, RangeValidator, etc) is triggered?

Basically, I have a complicated layout that requires I run a custom script whenever a DOM element is shown or hidden. I'm looking for a way to automatically run this script when a validator is displayed. (I'm using validators with Display="dynamic")

like image 473
Seth Petry-Johnson Avatar asked May 10 '26 10:05

Seth Petry-Johnson


1 Answers

See this comment for how I managed to extend the ASP.Net client side validation. Others have managed to extend it using server side techniques.

like image 71
Geoff Avatar answered May 11 '26 22:05

Geoff