469,646 Members | 1,161 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

How to clear the validation summary without posting back - ASP.NET

Here is my dilema.

I have a validation summary that I use soley for my Required Field
Validators. I have it setup to run from a Page.Validate call in the
code-behind, this is because I need to be able to clear text or other various
functions need to be checked before it hits the back side.

That works fine if I do things that way up to a point, if by chance the
validation summary says "Date field required" then I edit the date and input
an incorrect date, which I have a JavaScript validation for, that message
will come up saying how to enter the date. The problem is that the
validation summary is now populated and it wont clear until I hit the server
again.

Is there a way to clear it or make it invisible through JavaScript on some
form function like onsubmit - we are using an external JavaScript file so
that everything is available to all pages, that will allow me to be able to
clear that summary? The final product does not need to show a message after
you hit the submit button unless that message is needed and by turning off
the "CausesValidation" property for the button then I lose the ability to
have that updated client side.

So to summarize what I am asking:

a)If there is a way to keep the causes validation property as true and still
be able to clear a result label before running that validation then what do I
need to do?

If that is not possible then.

b)If there is a way to clear out the validation summary or make it disappear
until I hit the server side again AFTER re-submitting the form after making
the necessary changes and possibly having an error caught through JavaScript
which will stop the postback?

Thanks,
Cleako

Nov 30 '05 #1
0 2727

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Stefan Richter | last post: by
3 posts views Thread by Gary Varga | last post: by
2 posts views Thread by nmakhan | last post: by
1 post views Thread by =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post: by
reply views Thread by =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post: by
1 post views Thread by daveh551 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.