Click here to Skip to main content
12,560,367 members (56,954 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Samples » Statistics


49 bookmarked

Capturing the Enter key to cause a button click

, 19 Jan 2007 CPOL
Have you ever wanted to trap the Enter key press event in ASP.NET and have it click a button for you? This article describes two options for capturing the Enter key press event and then clicking a button. One solution uses JavaScript, the other uses a Panel control.




This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
United States United States
I started my programmer career over 20 years ago doing COBOL and SAS on a MVS mainframe. It didn't take long for me to move into windows programming. I started my windows programming in Delphi (Pascal) with a Microsoft SQL server back end. I started working with when the beta 2 came out in 2001. After spending most of my programming life as a windows programmer I started to check out in 2004. I achieved my in April 2005. I have done a lot of MS SQL database stuff. I have a lot of experience with Window Service and Web services as well. I spent three years as a consultant programing in C#. I really enjoyed it and found the switch between and C# to be mostly syntax. In my current position I am programming in both and C#. Lately I have been using VS2015.

On a personal note I am a born again Christian, if anyone has any questions about what it means to have a right relationship with God or if you have questions about who Jesus Christ is, send me an e-mail. ben.kubicek[at]netzero[dot]com You need to replace the [at] with @ and [dot] with . for the email to work. My relationship with God gives purpose and meaning to my life.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161026.1 | Last Updated 19 Jan 2007
Article Copyright 2007 by kubben
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid