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 3 1514
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******** ******@TK2MSFTN GP10.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
You can also use something like:
Private Sub Page_PreRender( ...) Handles MyBase.PreRende r
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******** ******@TK2MSFTN GP10.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 submitted whether it's finished or
not.
Is there an easy way to correct this?
My site only cares about IE.
|
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 will take them to the next
field. Instead it submits the form and this causes all kinds of problems in
my case. Any javascript solution?
|
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.
I was able to do this very simply in VB6, however, I have not found a method
to do this in .NET.
--
Take Care,
Dave
|
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 server side textbox control
to do something - eg change the words on label - when the key pressed
is the "enter" key.
I can see the label change to what i expect ----- BUT .... then the
|
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 control this default
behavior? I figured I could have an "are you sure?" confirmation if fields
are blank, but I think I'd just rather make it so enter doesn't submit the
form.
Any examples or suggestions for me? Thanks!
Matt
| |
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 the User
hits the "Enter" button the focus will move to the next Tab item (i.e. the
Check Box). Likewise on the Check Box but obviously if a Command Button has
the focus, it will initiate the Click event
I have set the Forms CancelButton to the...
|
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 e.Handled in the KeyUp event where I use SelectNextControl. That
didn't do it. I then added e.Handled to the KeyDown event. I still get the ding. Is there something else I need to do?
--
Al Reid
|
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 with focus i have to hit two keys on the key board to send a space in order to "click" the button. I want to just hit one key, the enter key, instead.
So, how do i trap the enter and turn it into a space?
I tried putting the following code in...
|
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 "KeyDown" event. Or if it is, it isn't being caught by the handler.
Is there a way to disable the button being clicked by pushing Enter?
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |