473,499 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Default button and web controls

I have some pages that have one or more WebUserControls on them. I want
to have a button that is not on a WebUserControl to be the default
button when enter is pressed.
I've tried just adding:
RegisterHiddenField("__EVENTTARGET", FindControl("btnVerify").ID)

to the main page, but wen I press enter from a textbox in a
WebUserControl, the specified button is not pressed (a different one is).
Any ideas on how to get around this? Thanks!

Matt
May 2 '06 #1
1 982
DWS
Matt,
usesubmitbehavior=false on all buttons except your default button

Good Luck
DWS

"MattB" wrote:
I have some pages that have one or more WebUserControls on them. I want
to have a button that is not on a WebUserControl to be the default
button when enter is pressed.
I've tried just adding:
RegisterHiddenField("__EVENTTARGET", FindControl("btnVerify").ID)

to the main page, but wen I press enter from a textbox in a
WebUserControl, the specified button is not pressed (a different one is).
Any ideas on how to get around this? Thanks!

Matt

May 3 '06 #2

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

Similar topics

3
6711
by: Marty McFly | last post by:
Hello, I have a control class that inherits from System.Web.UI.WebControls.Button. When I drag this control from the "My User Controls" tab in the toolbox onto the form, I want it to reflect the...
5
5403
by: Wonder | last post by:
How can I create or use the msgobx to show a message without a default button. The user has explicity to click on the button, so the msgbox closes it. Thanks,
2
9824
by: AlecL | last post by:
Hi All, I have added a user control onto an aspx page and want to make the submit button of that user control the default button when the panel in which the user control is located is visible. ...
0
1363
by: Glenn | last post by:
I currently have a page that contains a logon control and a Wizard control. I am having an issue when the user hits the "Enter" key, the user gets logged off. This is because the logon control...
5
1977
by: Zytan | last post by:
Is it possible (I doubt it) to have multiple default buttons in a form? I have several group controls in a single form, and when the focus is within one of the group controls, I want a specific...
0
7134
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
7014
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
7180
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
7229
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
7395
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...
1
4921
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
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
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
311
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.