Client side validation not working

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2VzYXI=?=, Jun 15, 2005.

  1. 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
    =?Utf-8?B?Q2VzYXI=?=, Jun 15, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    14
    Views:
    4,096
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  2. =?Utf-8?B?dmlkeWE=?=
    Replies:
    1
    Views:
    750
    Kevin Spencer
    Jun 2, 2005
  3. Alan Silver
    Replies:
    1
    Views:
    3,771
    Alan Silver
    Aug 2, 2005
  4. Boss302
    Replies:
    0
    Views:
    1,043
    Boss302
    Nov 21, 2006
  5. Bogdan
    Replies:
    2
    Views:
    651
    Bogdan
    Jun 9, 2008
Loading...

Share This Page