Wednesday, March 21, 2012

dropdownlist and server side validation control

Hi

I have a dropdownlist and it has a required field validator inside an updatepanel. Validation is done on server side and client side is disabled.
I have other controls with required field validations (server side only) and is NOT inside update panel.

The issue is when i select an item in dropdownlist it does a partial postback and validation is performed and the error message next to the dropdownlist will disappear. But for the other controls though the user fills in the data, the error message will only disappear on full postback on submit button click. This might be confusing for the user.

How can i make it work to have a standard error message display ONLY ON submit button click for all controls (including the partial postback controls inside updatepanel) ?

Is there any way i can do other than,
1. validation summary on top/bottom of the page.
2. Taking validation control outside update panel. If i have more than 10 controls, then i need to add more than 10 update panel and html table structures etc. etc.

Any ideas?

Thanks
Ganesh K

Validators are not compatibale with ASP.NET AJAX 1.0

http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx

You can download another version of validators from here

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

No comments:

Post a Comment