[Mono-dev] Various Master Page Related Problems
pbaena at gmail.com
Fri Sep 14 10:19:32 EDT 2007
You don't use UniqueID to refer to the client ID of the control, you use
For the other problem you should show us some code.
Kevin Monceaux wrote:
> Mono Developers,
> I've tried posting a few messages to the Mono users list about the
> problems and have received absolutely no replies. So, I thought maybe I
> should try here. I'm working on converting a PHP based web site to
> Mono/ASP.NET. I've come across several quirks which all appear to related
> to Master Page related problems.
> The first problem I came across was trying to set the focus to the
> username field on my login form. Since I'm using master pages, I added:
> Page.Form.DefaultFocus = UserName.UniqueID
> to the page's Page_Load function. I'm not using a login control, just a
> plain form. Anyway, it worked on IE but not on Firefox. Viewing the page
> source the UserName field is being rendered as:
> <input id="ctl00_MainContent_UserName" type="text"
> name="ctl00$MainContent$UserName" />
> And, the function to set the field focus as:
> It's passing the input field's name to the AutoFocus function. If I
> adjust the technique I used to set the default focus to:
> Page.Form.DefaultFocus = UserName.UniqueID.Replace("$", "_");
> so that it passes the input field's id instead of it's name to the
> AutoFocus function it works on both IE and Firefox. I'm using that
> workaround for now.
> I had the same problem with a CreateUser control. Using just:
> Page.Form.DefaultFocus =
> worked on IE, but not on Firefox. Adding a .Replace("$", "_") to it got
> it working on both IE and Firefox.
> The next problem I ran into was with a menu control. It worked as
> expected on IE. I have the menu control set up so that the background
> should be white. When I view it on Firefox the menu's background is being
> rendered as black instead of white. Looking at the css the menu control
> is adding to the page it looks like this might be another name/id problem.
> Next, I'm having a problem with some DropDownList controls. I have the
> AutoPostBack and OnSelectedIndexChanged parameters set appropriately.
> When I tested it yesterday on IE it worked. On Firefox, I had to hit
> enter after making a selection to get it to process the selection.
> Today, I tried it again on IE and when I select an item from the dropdown
> list an error icon shows up in the status bar. If I check the error's
> details it shows:
> Error: 'this._form__EVENTTARGET' is null or not an object
> Once again, viewing the page source and comparing the select field's
> onchange parm it looks like this might be another name/id related problem.
> Any assistance in rectifying these problems would be appreciated
> Bruceville, TX
> Si hoc legere scis nimium eruditionis habes.
> Longum iter est per praecepta, breve et efficax per exempla!!!
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list