473,756 Members | 3,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login Control -- Set Focus ?

Good evening friends,

I am working with Visual Studio 2005, ASP.NET 2.0

I am working with the Login controls provided my .NET 2.0, trying to make
the Login1 control UserName textbox obtain SetFocus upon load of the .aspx
web page but I cannot for the life of me get this to work. It loads and the
Focus is not working.

I have tried the following:

<asp:Content ID="Content1" runat="server"
ContentPlaceHol derID="ContentP laceHolder1">
<br />
<br />
<form runat=server id="aspLoginFor m">
<script language='JavaS cript' type="text/javascript">
<!--
function SetFocus()
{
//This is not working.......? ??
document.aspLog inForm['Login1_UserNam e'].focus();
}
window.onload = SetFocus;
// -->
</script>
<div>
<br />
<br />
<br />
&nbsp;</div>
<br />
<br />
<br />
<br />
<br />
<asp:Login ID="Login1" runat="server"
Any ideas would be greatly apprecited.

Thanks in advance,

~Brad

Jan 18 '07 #1
1 2730
Dear freinds,

I am searching with Google and still cannot find anything that will work.

I tried this and it still does not see it :::
form runat=server id="aspLoginFor m" defaultfocus="L ogin1_UserName" >

Any ideas would be greatly apprecited.
Thanks in advance,

~Brad
"Brad Isaacs" <bi*****@rogers .comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Good evening friends,

I am working with Visual Studio 2005, ASP.NET 2.0

I am working with the Login controls provided my .NET 2.0, trying to make
the Login1 control UserName textbox obtain SetFocus upon load of the .aspx
web page but I cannot for the life of me get this to work. It loads and
the Focus is not working.

I have tried the following:

<asp:Content ID="Content1" runat="server"
ContentPlaceHol derID="ContentP laceHolder1">
<br />
<br />
<form runat=server id="aspLoginFor m">
<script language='JavaS cript' type="text/javascript">
<!--
function SetFocus()
{
//This is not working.......? ??
document.aspLog inForm['Login1_UserNam e'].focus();
}
window.onload = SetFocus;
// -->
</script>
<div>
<br />
<br />
<br />
&nbsp;</div>
<br />
<br />
<br />
<br />
<br />
<asp:Login ID="Login1" runat="server"
Any ideas would be greatly apprecited.

Thanks in advance,

~Brad

Jan 19 '07 #2

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

Similar topics

14
2632
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a template which is not such a bad thing in itself but it means all other controls in the application must also be converted to templates to maintain a consistent UI. So much for writing 70% less code when foolish morons release a control with no cancel...
1
2249
by: David R. | last post by:
Using <asp:Login ID="Login1" runat="server"> Is it possible to set the initial cursor focus on the Username text field when the page initially loads?
0
1018
by: Server Girl | last post by:
I am using a WebBrowser control, and I login using this code: byte postArgs = System.Text.Encoding.ASCII.GetBytes ( LOGIN_PARAMETERS ); mainWebBrowser.Navigate ( LOGIN_URI, null, postArgs, "" ); mainControl.SelectTab ( browserTab ); mainControl.Focus ();
5
1590
by: Glen | last post by:
Does anybody know a way to make the button on the Login control be the default button on the page? I have a master page with an ImageButton and a content page with a Login control. When I enter the id and password and press the Enter key, the ImageButton (on the master page) fires instead of the Login button of the Login control on the content page. The Login composite control does not appear to expose a reference to its button. ...
13
4032
by: knot2afrayed | last post by:
I am trying to fix error- object does not exist- I want it possible to allow object not to exist. I am writing a script on a page that may or may not include a login form. For example-after a visitor logs in, the login form is no longer on the page, but other content is still there. I want to bring focus to the login form using the onLoad in the body tag.....but if the login form does not exist, I do not want to perform this function.
1
5135
by: clickon | last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the respective activate event handlers for the two steps, TextBox1.Text ="foo"; and TextBox2.Text = "bar";
4
2753
by: sowencheung | last post by:
Hi, all The scenario is like this: I have a master page, contains two user controls, one is a search control, another is a login control. The server-side <form> is in the master page, that's of course. It seems the search control is rendered first, when I stay in the
8
2143
by: Brad Isaacs | last post by:
Good morning friends, I am working with Visual Studio 2005, ASP.NET 2.0 I am working with the Login controls provided my .NET 2.0, trying to make the Login1 control UserName textbox obtain SetFocus upon load of the .aspx web page but I cannot for the life of me get this to work. I tried using the defaultfocus on the Form but that did not work.
1
2176
by: vinodkreddy1 | last post by:
how to Set default Focus to a button in login page that contains more that two button on Enter key pressed in Mozilla. Control.focus() working in IE but not in Mozilla Can any one help me down how to do this in mozilla. i want this in ASP.NET 1.1
0
9456
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
10034
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, 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...
0
9872
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...
0
9713
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...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5142
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
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.