Submit Form on Enter Pressed

Discussion in 'ASP .Net Web Controls' started by TCORDON, Apr 26, 2005.

  1. TCORDON

    TCORDON Guest

    Why does the click event of an image button that submitts a form does not
    get fired when ENTER is pressend on a textbox of that form? How can I make
    this happen?

    Thanks
     
    TCORDON, Apr 26, 2005
    #1
    1. Advertising

  2. You can intercept the client side enter keypress event of the text box and
    then do what you want using javascript code.

    Here's 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

    You could also try using this free control.
    http://www.metabuilders.com/tools/DefaultButtons.aspx

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


    "TCORDON" <> wrote in message
    news:...
    > Why does the click event of an image button that submitts a form does not
    > get fired when ENTER is pressend on a textbox of that form? How can I make
    > this happen?
    >
    > Thanks
    >
     
    Steve C. Orr [MVP, MCSD], Apr 26, 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. Frank
    Replies:
    2
    Views:
    687
    Frank Dux
    Jan 13, 2005
  2. Rune
    Replies:
    6
    Views:
    1,268
    Richie Hindle
    Jan 29, 2004
  3. Guest
    Replies:
    2
    Views:
    1,604
    Guest
    Oct 25, 2004
  4. Megha Vishwanath
    Replies:
    3
    Views:
    720
    Megha Vishwanath
    Jul 20, 2004
  5. HopfZ
    Replies:
    0
    Views:
    576
    HopfZ
    Aug 28, 2006
Loading...

Share This Page