Client side validation not working

G

Guest

Hello,
I have a problem where my validators are not stopping the web browser to
postback even when the validation is not met!! Let me try to explain.

I have an application with some "hidden" div tags. This divs contain
several validators (required validators, custom validators, regular expresion
validators) to validate the user entries.
They are something like this:
<asp:RequiredFieldValidator Runat="server" ErrorMessage="The field is
required" ID="reqValid" ControlToValidate="selMyDropDown"
InitialValue="0">*</asp:RequiredFieldValidator>

I also have a validation summary like this:
<asp:ValidationSummary Runat="server" ID="valSum" ShowMessageBox="True"
ShowSummary="False"></asp:ValidationSummary>

When I hit the submit button, the little asterisk appears next to my field
and I get the alert with my error messages (which is the correct behavior)
BUT the page DOES postback!!

I had had no major issue with this as the server validation is working
properly. But now, my users do not want the page to refresh at all if the
validation is not met... any ideas of how to fix this??

I have tried everything, I even created a custom validator just to asign
the args.IsValid = false; and it is still posting back... I have no idea of
what the problem can be!!!

Also, it is worth to mention that this is happening only for few of my
"divs" as others are working perfectly!!

Any thoughts?

Regards and thanks for reading,
Cesar
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top