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="aspLoginForm" defaultfocus="Login1_UserName">
Any ideas would be greatly apprecited.
Thanks in advance,
~Brad
"Brad Isaacs" <> wrote in message
news:%23q$...
> 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"
> ContentPlaceHolderID="ContentPlaceHolder1">
> <br />
> <br />
> <form runat=server id="aspLoginForm">
> <script language='JavaScript' type="text/javascript">
> <!--
> function SetFocus()
> {
> //This is not working.......???
> document.aspLoginForm['Login1_UserName'].focus();
> }
> window.onload = SetFocus;
> // -->
> </script>
> <div>
> <br />
> <br />
> <br />
> </div>
> <br />
> <br />
> <br />
> <br />
> <br />
> <asp:Login ID="Login1" runat="server"
>
>
> Any ideas would be greatly apprecited.
>
> Thanks in advance,
>
> ~Brad
>
>
>
|