Capturing the Enter key ASP.Net C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DeanC
    New Member
    • Aug 2010
    • 2

    #1

    Capturing the Enter key ASP.Net C#

    I am trying to capture the Enter kay when pressed on an ASP.net website in C#. I am not sure how this can be accomplished. Please help. Thank you.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    It can be accomplished using JavaScript.

    You would implement a method that captures all user input and checks to see if they hit the enter key...then do something.

    It would help if you provided more information about why you want to do this because you may just want to do something as simple as setting the Default Button for a Panel or Page....the JavaScipt method may be unnecessary depending on what you are trying to accomplish and why.

    -Frinny

    Comment

    Working...