Visible html table containing validation controls

A

aeshtry

Hello dear friends

I have an urgent question. Would you please give me your professional idea?
I have an html table containing the ASP.Net validation summary and an ASP.Net label control.
The table background has different color than other sections. I want to show the error message inside a section (with different background color) only when an error occurred. This error can be a validation client error (generated by validation controls like invalid characters for user id like $%) or a server error (generated when I check the values on the server like duplicate user id while adding a user).

At the beginning, the error section (table) should be invisible and when the error occurs, it should be visible and when the user corrects the error, it should be invisible again.


The problem is, for the server errors, I can put the table inside a Panel and visible it when the error occurred cause the page is post back after checking the info on the server side, but for the client validation error, I should probably use JavaScript to access the client site (generated name) panel control and make it visible using document.GetElementByID or something similar. Not sure if it works or not? In this case, I also need the client side event name which is fire by the validation controls in case the input is not valid.

Any thought or URL? I will be much thankful if you get to an idea, send it to my email at (e-mail address removed).

Best Regards
Amir


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top