473,503 Members | 9,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting which key was pressed on a textbox

I'm having a problem with a textbox I'm using. On all the other pages i
have, if the user presses the enter key the form submits and moves on to the
next page. However with this page if the user presses enter, he/she is
directed to the index page of the site - None of the buttons on the page
even do that so I havent a clue whats going on!

Does anyone have any thoughts as to why this might be happening and any ways
to potentially circumvent it?

Many thanks everyone

Simon
Nov 18 '05 #1
1 1232
Check out this article, you can easily set a default action when the user hits enter from within a textbox.

http://www.allasp.net/enterkey.aspx

If you want more control over this process, you can look at this control
http://www.metabuilders.com/Tools/DefaultButtons.aspx

--Michael
"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message news:u1**************@TK2MSFTNGP12.phx.gbl...
I'm having a problem with a textbox I'm using. On all the other pages i
have, if the user presses the enter key the form submits and moves on to the
next page. However with this page if the user presses enter, he/she is
directed to the index page of the site - None of the buttons on the page
even do that so I havent a clue whats going on!

Does anyone have any thoughts as to why this might be happening and any ways
to potentially circumvent it?

Many thanks everyone

Simon

Nov 18 '05 #2

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

Similar topics

4
2171
by: Michael Albanese | last post by:
I am trying to build a user control that will allow a user to select a date from a calendar. I have to code that will run on the calendar's SelectionChanged event, but i am at a loss to return the...
3
1758
by: Csaba Gabor | last post by:
If I detect an empty textbox, I fill it with a value ('Dad'). If I do this twice, the second time around IE 6 fails to notice that I've cleared the textbox again, thus leaving the textbox cleared....
4
6487
by: Woody Splawn | last post by:
I would like to be able to know if the user has pressed a key in any text box on a winform or in other words, if he is editing a record. I would like to know this as soon as he presses any key. I...
3
2018
by: Woody Splawn | last post by:
We have a client server application where we would like to not show Save and Cancel buttons on a winform until the user has actually entered something into a textbox or combobox etc., and there is...
2
3558
by: RTT | last post by:
<form id="Form1" method="post" runat="server"> <asp:textbox id="TxtEmail" tabIndex="1" runat="server" Width="272px" ToolTip="Enter your emailaddress for authentication"></asp:textbox> <asp:textbox...
2
13454
by: matthewr | last post by:
In Internet Explorer, for example, when you hit return in the address bar, the Go button is pressed. In my program, I have a toolstrip with a textbox and button. How do I ensure the button is...
9
2138
by: shir | last post by:
hi.. i need help with this program. this is a program to turn 'ON' and 'OFF' 1 LED using 2 push buttons. the underline statement suppose to wait for button press. but it is alway false even i have...
2
4774
by: bobh | last post by:
Hi All, In AccessXP I have a form, it has a form header, detail and footer sections. When done entering text in a txtbox(bxReqst) in the footer the user wants to press the Tab key and have the...
2
4412
by: jodleren | last post by:
Hi I want to open a window using JS, when a button is pressed. In the new window I'd like to check for which button was pressed. For cetain reasons, I'd like not to have that in the URL. What...
0
7193
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,...
0
7067
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...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4992
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...
0
4666
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...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
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 ...
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.