473,789 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.LoadContro l() 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 1823
Look at the following posts.

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

"Ben Fidge" <be*******@btop enworld.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.LoadContro l() 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_Lan guages/Dot_Net/Q_2
0944907.html
"Ben Fidge" <be*******@btop enworld.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.LoadContro l() 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
262
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 Page_Init event. In that control I have hyperlink that loads a new window through javascript with a calendar in it.
11
3142
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 useful utils that more pages on that server can use. As an example, I have created a Page Counter class that opens an Access .mdb file, counts the current entries for that page, and adds a new entry with some information regarding the current...
8
10801
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 = "link1" ctrl.Text = "link create" ctrl.CommandArgument = "myargument"
1
13722
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 and set methods on the user control "editButton.ascx" which work fine. How do i pass parameter into the user controls "c1", "c2" ? Here is a bit of my code that is calling the user control from the
9
2347
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 are set to the value of the last control. I found this link: http://www.codecomments.com/archive315-2005-1-366113.html which I think explains the situation but I'm not sure how to implement the solution in my case since I am not using a .ascx...
8
2267
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 happens. dim filt as string ... build filter string... UserControl.ReportFilter = filt
1
6510
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" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
6
11082
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 how those properties are set. I want to be able to do two other things: a) add User control instances to my page, filling in the place of placeholder controls, and b) programmatically setting custom properties on those dynamically spawned...
0
1380
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 appears at the top of the page and the browser defines the first submit button that appears on the page as the "default" button. On other pages I have resolved this issue by wrapping my input controls in an ASP Panel and setting the panel's...
0
9511
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,...
0
10200
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 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...
1
10139
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,...
0
9984
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 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...
1
7529
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
6769
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
5418
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...
1
4093
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
3
2909
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.