Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Client side validation not working

Reply
Thread Tools

Client side validation not working

 
 
=?Utf-8?B?Q2VzYXI=?=
Guest
Posts: n/a
 
      06-15-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute client-side code _after_ client-side validation? Bogdan ASP .Net 2 06-09-2008 01:31 PM
Client side script after client side validation with asp.net 2.0 Boss302 ASP .Net 0 11-21-2006 08:43 AM
ASP.NET client-side validation working, but button click not working Alan Silver ASP .Net 1 08-02-2005 03:50 PM
Using both server side validation and client side validation =?Utf-8?B?dmlkeWE=?= ASP .Net 1 06-02-2005 09:45 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM



Advertisments