Textbox1.Focus(); does not work; as does not Page.SetFocus(Textbox1); why?

Posted by b0x0rz on Stack Overflow See other posts from Stack Overflow or by b0x0rz
Published on 2010-05-16T12:54:43Z Indexed on 2010/05/16 13:00 UTC
Read the original article Hit count: 308

Filed under:
|
|
|

as stated both of these do not work:

Textbox1.Focus();

or

Page.SetFocus(Textbox1);

any idea why?

this is the control itself:

<asp:TextBox ID="Textbox1" ClientIDMode="Static" CssClass="Textbox1"
                runat="server" MaxLength="80"></asp:TextBox>

it is located on a page, two master pages deep. the form tag is on the second master page, so that is why the focus is not being set there.

not working in: ie, firefox, chrome and safari (all latest versions).

help! thnx

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#