473,387 Members | 1,575 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,387 software developers and data experts.

Setting default button on dynamically loaded Web User Control

Hi

I'm writing a web application where the entire site is
driven through a single page, and content is dynamically
loaded using Web UserControls. This is achieved by using
Page.LoadControl() from within the main page.

My Login UserControl has a "Login" button and I want that
to become the default button when the user presses
[Enter].

Currently, the LinkButton that the user clicks on to load
the Login UserControl retains the focus. After they've
entered their Username and Password, pressing [Enter]
fires the OnClick event for the above LinkButton, instead
of the UserControl's "Login" button.

How can I force the UserControls "Login" button's OnCLick
to fire when the user presses [Enter].

Thansk

Ben

Nov 18 '05 #1
2 1806
Look at the following posts.

http://www.experts-exchange.com/Prog..._20944907.html

"Ben Fidge" <be*******@btopenworld.com> wrote in message
news:41****************************@phx.gbl...
Hi

I'm writing a web application where the entire site is
driven through a single page, and content is dynamically
loaded using Web UserControls. This is achieved by using
Page.LoadControl() from within the main page.

My Login UserControl has a "Login" button and I want that
to become the default button when the user presses
[Enter].

Currently, the LinkButton that the user clicks on to load
the Login UserControl retains the focus. After they've
entered their Username and Password, pressing [Enter]
fires the OnClick event for the above LinkButton, instead
of the UserControl's "Login" button.

How can I force the UserControls "Login" button's OnCLick
to fire when the user presses [Enter].

Thansk

Ben

Nov 18 '05 #2
Thanks for the reply. I had a quick look those posts
yesterday. If at all possible, I'd like to avoid
capturing the [Enter] keypress event if there's a
more "natural" way of doing it.

Thanks anyway :-)

Ben

-----Original Message-----
Look at the following posts.

http://www.experts- exchange.com/Programming/Programming_Languages/Dot_Net/Q_2
0944907.html
"Ben Fidge" <be*******@btopenworld.com> wrote in message
news:41****************************@phx.gbl...
Hi

I'm writing a web application where the entire site is
driven through a single page, and content is dynamically loaded using Web UserControls. This is achieved by using Page.LoadControl() from within the main page.

My Login UserControl has a "Login" button and I want that to become the default button when the user presses
[Enter].

Currently, the LinkButton that the user clicks on to load the Login UserControl retains the focus. After they've
entered their Username and Password, pressing [Enter]
fires the OnClick event for the above LinkButton, instead of the UserControl's "Login" button.

How can I force the UserControls "Login" button's OnCLick to fire when the user presses [Enter].

Thansk

Ben

.

Nov 18 '05 #3

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

Similar topics

0
by: Mark Stokes | last post by:
Hi guys, I have seen various messages on this front, but none specific to my requirement. I have an application that dynamically loads a user control and displays it on the page during the...
11
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some...
8
by: simon | last post by:
On code behind file: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim ctrl As New LinkButton ctrl.ID =...
1
by: Josh | last post by:
Hi Guys, I have been having a big problem with trying to pass parameters into a user control when the user control is dynamically loaded into a placholder. I am developing in c#. I have get...
9
by: james.e.coleman | last post by:
Hello, I have created a custom dropdownlist that is used multiple times within a single page. When trying to set the values of the controls with the page in which they are being used, they all...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
0
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
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
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...

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.