Validator Trickiness

Discussion in 'ASP .Net' started by riversmithco@hotmail.com, Feb 1, 2005.

  1. Guest

    Hi all,


    I have a simple form with 3 validator controls on it. How can I keep
    validation from firing when the user hits the enter key on their
    keyboard?

    Right now I have two buttons, one shows up conditionally and should
    cause validation, the other has CausesValidation = False, but the
    validation still fires on Enter.

    Thanks
     
    , Feb 1, 2005
    #1
    1. Advertising

  2. It sounds like you want your first button to be the default button when the
    user hits the enter key.

    You could use this free control to solve the problem.
    http://www.metabuilders.com/tools/DefaultButtons.aspx

    And here are a couple good articles on the subject:
    http://www.allasp.net/enterkey.aspx
    http://www.aspnetpro.com/features/2004/06/asp200406so_f/asp200406so_f.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    <> wrote in message
    news:...
    > Hi all,
    >
    >
    > I have a simple form with 3 validator controls on it. How can I keep
    > validation from firing when the user hits the enter key on their
    > keyboard?
    >
    > Right now I have two buttons, one shows up conditionally and should
    > cause validation, the other has CausesValidation = False, but the
    > validation still fires on Enter.
    >
    > Thanks
    >
     
    Steve C. Orr [MVP, MCSD], Feb 1, 2005
    #2
    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. Serdar Kalaycý

    Custom Validator

    Serdar Kalaycý, Jul 7, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    538
    Serdar Kalaycý
    Jul 8, 2003
  2. Antonio Maciel

    Validator controls and usercontrols

    Antonio Maciel, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    379
    Antonio Maciel
    Jul 9, 2003
  3. Replies:
    4
    Views:
    917
    Richter~9.6
    Feb 13, 2007
  4. Replies:
    1
    Views:
    251
    Peter Otten
    Jul 18, 2008
  5. 7stud --

    instance_eval trickiness

    7stud --, Apr 15, 2011, in forum: Ruby
    Replies:
    0
    Views:
    125
    7stud --
    Apr 15, 2011
Loading...

Share This Page