Results 1 to 3 of 3

Thread: making the 'Enter' button fire the Click event for a button in .NET

  1. #1
    kenton311
    Guest

    Question making the 'Enter' button fire the Click event for a button in .NET

    hello all,

    if, on an ASP.NET page, i have multiple buttons that cause PostBack, how do i make it so that hitting the "Enter" key fires the click event for one of the buttons instead of firing a general postback??

    Thanks a lot!
    Kenton Taylor
    [email protected]

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    you could probably catch enter using client side javascript, but then you could only call a client side function.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    New Member
    Join Date
    Jan 2003
    Posts
    12

    Question Generate the click event when ENTER key is pressed

    In VB.NET, I have a web application and some web forms. One web form has Submit and Cancel buttons in addition to some other textbox controls. I would like to press Enter button and generate the 'Click' event for the submit button. How do I do this using VB.NET?

    Does anyone have some source code?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width