[Mono-list] Login Control Focus Problem

Kevin Monceaux Kevin at RawFedDogs.net
Tue Sep 4 11:59:47 EDT 2007


Fellow Mono Enthusiasts,

I'm having a problem with setting focus to the UserName field on a page 
with a Login control.  There is a master page involved, so I'm using:

     Page.Form.DefaultFocus = Login1.FindControl("UserName").UniqueID;

In the page's Page_Load method to set the focus.  If I view the page's 
source the UserName field looks something like:

     <input id="ctl00_MainContent_Login1_UserName" type="text"
            name="ctl00$MainContent$Login1$UserName" />

And, the AutoFocus javascript call that's being added to the page is:

     WebForm_AutoFocus('ctl00$MainContent$Login1$UserName');

which is passing the field's name to the AutoFocus function.  On Internet 
Explorer, the UserName field receives focus when I go to the login page, 
but on Firefox it doesn't.  If I try something similar with a "plain" 
form, one that doesn't involve a Login control, it passes the field's id 
instead of the field's name to the AutoFocus function and it works on both 
Firefox and IE.  Is this a bug in Mono's implementation of the Login 
control?



Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!



More information about the Mono-list mailing list