473,654 Members | 3,062 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

default button in child page?

I have a master page that has a button on it that is included on all of it's
child pages. On one of the chile pages, there is a login control. I would
like to have the login control become the default button when that page is in
use. Currently, if a user tries to log in, when they press the enter key,
the forms defaults to the actions of the button on the master page.

Any suggestios on how to fix this? I converted the login control to a
template, but i can't reference it as a default button in the form tag since
it is inside of the login control's template structure.

thanks for any assistance.
Mar 16 '06 #1
1 1489
Fabuloussites wrote:
I have a master page that has a button on it that is included on all
of it's child pages. On one of the chile pages, there is a login
control. I would like to have the login control become the default
button when that page is in use. Currently, if a user tries to log
in, when they press the enter key, the forms defaults to the actions
of the button on the master page.


Add this line in your page.load event handler:

Page.RegisterHi ddenField("__EV ENTTARGET", "btnYourButtonN ame")
Mar 16 '06 #2

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

Similar topics

1
5289
by: Miki Tebeka | last post by:
Hello All, I have a frame that contains a panel and several buttons. I'd like to make one of the button the default button but self.SetDefaultItem(btn) or btn.SetFocus() don't work. The item in focus is a text control inside the panel. Any Ideas? (see short example below) Thanks.
14
5453
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net that works well as an html page. It brings up a modal popup window that I have been trying to work out for days now and this was the closest I have been able to come. I added a little asp.net code and an asp.net button and cannot get it to
1
3438
by: kk | last post by:
Hello everyone, Thank you in advance for your time and help. Mine is an asp.net/C# application. I have an aspx page(parent window) which has a link that launches a new ie window with another aspx page(child window). The child window has a button with some server side event code for button_click. What I want to do is to close the child window after the server side event code has been executed for the button click.
2
2784
by: dh | last post by:
How can a button that resides on the Main page tell the child Iframes to redirect without the page posting back? I keep getting a javascript error: "frames.iframe1 is null or not an object." I'm assuming this is because when i press the button it reloads the page and the frames can't be referenced. here's a simple example: <HTML> <script language="C#" runat="server">
1
6967
by: Jeff Lynch | last post by:
I'd like to add the following attributes to the Login control's Login Button to create a CSS rollover effect. How can I access the control's login button from the page's code-behind? LoginButton.Attributes.Add("onmouseover", "this.className = 'buttonsmallover'"); LoginButton.Attributes.Add("onmouseout", "this.className = 'buttonsmall'"); -- Jeff Lynch
1
1470
by: Dev | last post by:
hi i have master page in which i have form and now in content page i need to set the defaultbutton. now i have one solution for that in content page "HtmlForm mainform = (HtmlForm)Master.FindControl("frmMain"); mainform.DefaultButton = btnSave.UniqueID;" i have use this code that solve my problem but now main problem is that i have around 500 page in which i have to
1
2165
by: JJ | last post by:
What trouble I'm having setting default buttons on a page (with a master page). I got around doing it on a page basis by calling the SetWizardDefaultButton() routine from page load. Notice how messy it looks because I could not find the required button any other way but by using the id it is given in the source code. I tried every combination of nested 'findcontrol' methods I could think of, but none worked??!! It seems to be...
2
1702
by: Gregory Gadow | last post by:
I have a large website written to use ASP.Net 2.0. The master page has a "logout" button. If the child page does not have an explicitly defined default button (most do not), the page posts back with the logout button as the default, throwing the user out of the system. I can supress all postbacks by putting "onsubmit='return false'" in the form tag of the master page. That, however, renders all button clicks and other postback calls...
2
2884
by: Peted | last post by:
Hi Im using c# express edition 2005 I have an MDI form, where i load multiple child forms from a dll i create, using reflection and late binding The child forms have multiple radio buttons in a groupbox, and have the appearence set to button
0
8375
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
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,...
1
8482
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,...
1
6161
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
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();...
0
4149
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...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2714
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
2
1593
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 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...

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.