highlighting textboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,

i have a 14 textboxes and 14 requiredfieldvalidator controls to validate the
textboxes. if one or more of the textboxes is empty, the corresponding
requiredfieldvalidator controls show error messages. if all are empty, then
14 error messages show up which takes up a lot of real estate.

as a better alternative, i would like to show only 1 generalized error
message "Pls. fill the highlighted textboxes." and just highlight the empty
textboxes. how do i do this and thanks in advance.
 
Newbie said:
hello,

i have a 14 textboxes and 14 requiredfieldvalidator controls to validate the
textboxes. if one or more of the textboxes is empty, the corresponding
requiredfieldvalidator controls show error messages. if all are empty, then
14 error messages show up which takes up a lot of real estate.

as a better alternative, i would like to show only 1 generalized error
message "Pls. fill the highlighted textboxes." and just highlight the empty
textboxes. how do i do this and thanks in advance.

1. You can have a custom validator
or
2. You can change the Display property of the validators to "None" and
add 1 validation summary.
As a result, all the validators will not be visible but the validation
summary.

I hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top