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. Advertisements

  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. Advertisements

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. gh0st54
    Replies:
    2
    Views:
    7,524
    gh0st54
    Sep 27, 2004
  2. Frank
    Replies:
    2
    Views:
    781
    Frank Dux
    Jan 13, 2005
  3. Rune
    Replies:
    6
    Views:
    1,568
    Richie Hindle
    Jan 29, 2004
  4. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    635
    Anders Matthiessen
    Jan 12, 2005
  5. Guest
    Replies:
    2
    Views:
    1,858
    Guest
    Oct 25, 2004
  6. Replies:
    4
    Views:
    458
    Ray Costanzo [MVP]
    Oct 4, 2005
  7. Megha Vishwanath
    Replies:
    3
    Views:
    976
    Megha Vishwanath
    Jul 20, 2004
  8. HopfZ
    Replies:
    0
    Views:
    917
    HopfZ
    Aug 28, 2006
Loading...