I have a website (ASPNET2) where the master page has a button in it and my login page, which is a detail page of the master page,
also has a button (a login button).
Everything works fine if I enter my user ID and password and click the Login button. But if I hit the return key instead the master
page button gets invoked instead of the Login button.
Is there a way of ensuring the Login button on the detail page gets the "default" return key event rather than the master page?
Other than disabling the master key button, which I know will work.
- Mark 4 2256
Hello,
To get around this problem, you may use a HTML INPUT button instead of
asp:Button control on the msater page. for example:
<input id="Button1" style="width: 107px; height: 49px" type="button"
value="button" runat="server" onserverclick=" Button1_ServerC lick" />
Asp:Button control will be rendered as Input Submit control in client
browser. When you press enter key in a textbox, the first Input Submit
control in a web page will be invoked.
Hope this help,
Luke
Luke,
I didn't mention that the button on the master page is an ImageButton control. Is there a simple way to force the ImageButton
control to not be rendered as a submit button?
- Mark
Hello,
To replace a ImageButton:
<img id="img1" src="p1.jpg" style="width: 97px; cursor: hand;"
runat="server" onclick="__doPo stBack('img1',' ')" />
Notice there is no event handler function in the code behind now, we need
to handle the click event:
protected void Page_Load(objec t sender, EventArgs e)
{
if (Request.Form.A llKeys.Length > 0 &&
Request.Form["__EVENTTAR GET"] == "img1")
{
//add button click handler here.
}
}
Luke This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Raphael Gluck |
last post by:
Hi Everyone
I am having some problems with a master detail page i have set up to
catalogue brochures from my site.
On my master page www.tripakltd.com/brochures.asp users are invited to
select from a list of brochure categories, then once they press the submit
button they will be taken to a different page www.tripakltd.com/library.asp
The problem i am having, is that when I tell the detail page about the
variable from the master page as...
|
by: M |
last post by:
Hy,
I would like to create a master /detail datagrid,
that is a datagrid that (when I click on an item)
shows some other item's details
expanding the rows under the selected grid
Can someone help me with this?
Thanks!
|
by: Ozgur YASAR |
last post by:
Hi,
i need to be able to active;
on the first page a process is started with a (master) record insert and
it will open next page
on the next page a datagrid will be used to insert update delete detail
vales of the master record
finally the "save" button will actually save the inputs master-detail
|
by: ivanpais |
last post by:
Hi,
I have a Web User Control, Lets say "Foo.ascx", that contains a button
"btnFoo".
I have a Master Page "Bar.master", that has a label "lblBar". This
label is exposed by a public property BarLabelText.
I now have a contentpage "FooBar.aspx", where "Bar.master" is the
master page and in the content section has the control "Foo.ascx".
|
by: Sam |
last post by:
Folks, Attached I am sending 2 URL's from MSFT ASP.net Quick Start
Tutorial Web Site.
1) Run it URL:
http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetailsInsertPage_vb.aspx
2) View Source URL:
http://www.asp.net/QuickStart/util/srcview.aspx?path=~/aspnet/samples/data/GridViewMasterDetailsInsertPage.src
I do understand from the Master Page
(GridViewMasterDetailsInsertPage_vb.aspx) the last field from Gridview1
| |
by: Sam |
last post by:
Attached I am sending 2 URL's from MSFT ASP.net Quick Start
Tutorial Web Site.
1) Run it URL:
http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetai...
2) View Source URL:
http://www.asp.net/QuickStart/util/srcview.aspx?path=~/aspnet/samples...
|
by: Sam |
last post by:
Sorry to post the same post multiple times but the URL Addresses were
not Correct in Earlier Posts.
Here are the correct URL's:
1) Run It URL is here:
http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetailsInsertPage_vb.aspx
|
by: plang |
last post by:
:confused: I created a travel request form that allows multiple travelers and multiple legs per request. I have a standard form view that collects the traveler info from a main form and fills in the standard form view with the applicable data. Now I need to be able to print one standard form for each traveler with only one leg of travel per standard form.
I created the master table for the traveler and a master table for the itinerary leg...
|
by: Janet |
last post by:
Hi,
I'm trying to use the master/detail page to display the information of
staff. The master page will display some general information, while the
differen detail pages will show the different kinds of staff details, like
family member details, contact information, etc.
Hence, this case, I'll have
- Staff.master
- Family.aspx
|
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...
|
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: 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |