I have to emit the javascript to set the focus to a control in an ASP.NET during the page load.
I have done it in the RegisterStartupScript. It works fine in the textbox control but in the case of radiobuttionlist,
checkBoxlist the focus is set, but the user is not able to realize this as the control is not highlighted.
If I use the tab key or arrow key it does higlight the control and second time page is refereshed it highlights the control.
A strange thing is that if the page is browsed inside the IDE,
the focus is set as well as the focused control is highlighted. Any help will be greatly appreciated.
---
Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Martin Honnen - 20 Jan 2004 14:12 GMT
> I have to emit the javascript to set the focus to a control in an ASP.NET during the page load.
> I have done it in the RegisterStartupScript. It works fine in the textbox control but in the case of radiobuttionlist,
[quoted text clipped - 3 lines]
> A strange thing is that if the page is browsed inside the IDE,
> the focus is set as well as the focused control is highlighted. Any help will be greatly appreciated.
An ASP.NET page is usually rendered in some browser so you would better
tell us which browser has that behaviour

Signature
Martin Honnen
http://JavaScript.FAQTs.com/
bruce barker - 20 Jan 2004 17:30 GMT
you are probably setting the focus to the span that contains the controls,
not the first control in the list as you shuold be doing.
-- bruce (sqlwork.com)
> I have to emit the javascript to set the focus to a control in an ASP.NET during the page load.
> I have done it in the RegisterStartupScript. It works fine in the textbox control but in the case of radiobuttionlist,
[quoted text clipped - 6 lines]
> ---
> Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/