473,586 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

button click event when keyboard's enter key is pressed

Hello All,

How can I force the control to go to click event handler if a keyboard's
enter key is pressed instead of the user clicking the button. I remember that
we need to create a hidden textbox or something of that sort but could you
please guide me in this process?

Thanks,...
Nov 19 '05 #1
2 2144
Hi,

Check this one: http://www.allasp.net/enterkey.aspx

"Diffident" <Di*******@disc ussions.microso ft.com> wrote in message
news:DD******** *************** ***********@mic rosoft.com...
Hello All,

How can I force the control to go to click event handler if a keyboard's
enter key is pressed instead of the user clicking the button. I remember
that
we need to create a hidden textbox or something of that sort but could you
please guide me in this process?

Thanks,...
Nov 19 '05 #2
You could use this free control.
http://www.metabuilders.com/tools/DefaultButtons.aspx

And here's a couple good articles on the subject:
http://www.allasp.net/enterkey.aspx
http://www.aspnetpro.com/features/20...200406so_f.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Diffident" <Di*******@disc ussions.microso ft.com> wrote in message
news:DD******** *************** ***********@mic rosoft.com...
Hello All,

How can I force the control to go to click event handler if a keyboard's
enter key is pressed instead of the user clicking the button. I remember
that
we need to create a hidden textbox or something of that sort but could you
please guide me in this process?

Thanks,...

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2835
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new data from the button is not available at this time as to allow the table to properly update. So basically, I need to call UpdateTable() twice, once...
1
1730
by: Veeresh | last post by:
When I enter some data in textbox1 and hit enter key resulting in calling the clicked event of Button1. What I am doing wrong here? -- Veeresh Here is my code. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm2.aspx.vb" Inherits="Test001.WebForm2"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML>...
11
10995
by: Sarah | last post by:
I have code that I want to run so that if the result is true, it changes the current button's ".DialogResult" property to "DialogResult.OK". Problem is, when I run this code on the ".Click" event for the current button and then run this code, if the ".DialogResult" property is change, it does not take affect until the button is pressed again....
20
57722
by: anthonymelillo | last post by:
Is there a way to call a button click event from somewhere else ? I have a text box where I would like to call a button click event when a user presses enter in the text box. Can I do this ? Thanks Tony
1
1130
by: Jim McGivney | last post by:
I would like to have an asp.button fire (invoke click event) when the user presses the ENTER button on their keyboard. Any suggestions would be appreciated. Thanks, Jim
3
4261
by: Robert W. | last post by:
I'm new to ASP.net programming so excuse my ignorance if the following question seems overly simplistic. I've created a simple Login form with 3 primary WebControls: - A TextBox for the Username - A TextBox for the Password - A Button labelled "Submit" If the user enters a correct username/password combination then he's taken to another...
17
9637
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick event. But if I press the button without entering text first, the button click event does work. What's up? <html> <body> <h3>Events on Buttons and...
0
2027
by: nraji | last post by:
hi, I have designed a web part using VS 2003 (Web control library template). I need to publish that in share point. Its not like drag and drop the things from toolbar. Every thing I need to do in code behind side. I have a button and text box Button Id: btnSearch TextBox id: txtSearch
1
8778
by: RyanT | last post by:
Access 2000 Windows XP I have a small form with two text boxes: - User ID - Password The form also has two command buttons: - Login - Cancel
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.