473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

hitting the "enter" key

PJ6
I want to be able to, depending on the state of the page, direct what the
ENTER key causes the page to do.

The problem I'm having is I have a user control with a textbox and an
"enter" button. If this control is in a certain state, when the user hits
the ENTER key on that page, I want the ENTER event to be sent to the ENTER
button in that control, like the defuault button-clicking behavior I'm
seeing when a button is in the form istelf and not within a user control.

Is that possible?

Paul
Nov 19 '05 #1
3 1503
Try http://www.metabuilders.com/Tools/DefaultButtons.aspx

Works fine and it's free!

Nov 19 '05 #2
You could use this free control to solve the problem.
http://www.metabuilders.com/tools/DefaultButtons.aspx

And here are 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
"PJ6" <no****@nowhere.net> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
I want to be able to, depending on the state of the page, direct what the
ENTER key causes the page to do.

The problem I'm having is I have a user control with a textbox and an
"enter" button. If this control is in a certain state, when the user hits
the ENTER key on that page, I want the ENTER event to be sent to the ENTER
button in that control, like the defuault button-clicking behavior I'm
seeing when a button is in the form istelf and not within a user control.

Is that possible?

Paul

Nov 19 '05 #3
You can also use something like:

Private Sub Page_PreRender(...) Handles MyBase.PreRender
DoSearch()
End Sub

Private btnSearch_Click(...) Handles btnSearch.Click
Do Search()
End Sub

Private Sub DoSearch()
....
End Sub

When they hit the Enter key it will act as if they hit the button.

"PJ6" <no****@nowhere.net> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
I want to be able to, depending on the state of the page, direct what the
ENTER key causes the page to do.

The problem I'm having is I have a user control with a textbox and an
"enter" button. If this control is in a certain state, when the user hits
the ENTER key on that page, I want the ENTER event to be sent to the ENTER
button in that control, like the defuault button-clicking behavior I'm
seeing when a button is in the form istelf and not within a user control.

Is that possible?

Paul

Nov 19 '05 #4

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

Similar topics

8
by: EBG | last post by:
I have a simple email form on my site but getting screwy results because I know alot of users are hitting "enter" instead of tab when doing the form. When they hit enter the entire form is...
4
by: Simon Wigzell | last post by:
Is there a way to prevent a form submitting when you press enter on a text field? Some people press enter when they finish typing in a text field out of habit I guess unconcsciously thinking it...
1
by: Dave McCloskey | last post by:
How can I convert the "Enter" key to a "Tab" so my application will act like "Tab" has been hit when the "Enter" key has actually been depressed. This gives type-writer functionality to programs....
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
2
by: MattB | last post by:
I have a WebForm that has a "reset" button and an "Enter" button. It's a long form, and users tend to hit the enter key at some point when they really want to tab to the next form field. How can I...
7
by: Doug Bell | last post by:
Hi, I have just built a small application with a form that has one Text Box and one Check Box and a couple of Command Buttons. What I am trying to achieve is that if the Text Box has focus and...
2
by: Al Reid | last post by:
I'm using vb2005. The users want to use the enter key to navigate instead of or in addition to the tab key. That's easy enough. How do I get rid of the ding when hitting the enter key. I have...
1
by: pippyn | last post by:
I'm programming for a CE device with reduced key board, no mouse, and no touch screen. As such, I have to tab from button to button to get the focus on the button i want. Then to invoke the button...
3
Curtis Rutland
by: Curtis Rutland | last post by:
OK, I have a question. I have a problem. I'm trying to catch all KeyDown events on a button, but the problem is when I press the "Enter" key, the button's "Click" event is triggered, not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...

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.