J
James Radke
Hello,
I would like to create some type of client-side validation that will change
the background color of a textbox (say to red with white text) when the
entered data is invalid (i.e. not numeric, not a valid date, etc.)...
I have figured out one way to do that using javascript, and the existing
..NET expressionvalidation controls; however, this requires that I write a
new javascript function for each textbox controls OnChange event that I want
to validate so that I can reference the appropriate textbox control and it's
associated validation control. Additionally this forces me to hardcode the
long .NET generated ID's (i.e. __ctl_ctl0__<id>) - which is kind of a pain.
What I am wondering is if there is a better way that I can do this so that I
don't send the round-trip to the server after they exit each field and still
get the great notification/visual of the background color of the textbox
changing?
Thanks!
Jim
I would like to create some type of client-side validation that will change
the background color of a textbox (say to red with white text) when the
entered data is invalid (i.e. not numeric, not a valid date, etc.)...
I have figured out one way to do that using javascript, and the existing
..NET expressionvalidation controls; however, this requires that I write a
new javascript function for each textbox controls OnChange event that I want
to validate so that I can reference the appropriate textbox control and it's
associated validation control. Additionally this forces me to hardcode the
long .NET generated ID's (i.e. __ctl_ctl0__<id>) - which is kind of a pain.
What I am wondering is if there is a better way that I can do this so that I
don't send the round-trip to the server after they exit each field and still
get the great notification/visual of the background color of the textbox
changing?
Thanks!
Jim