>>Setting DefaultFocus in the markup works for me. Also
Page.Form.DefaultFocus = "textbox";
>>// or safer:
>>Page.Form.DefaultFocus = textbox.ClientId;
in the Page load has the same effect. In either case the following javascript is generated in the form tag of the HTML:
<script type="text/javascript">
>>//<![CDATA[
>>WebForm_AutoFocus('textbox');//]]>
>></script>
>
>Hi Viv,
>
>Does it matter that my textbox is not directly on the form but inside the LoginView control? I'll try your suggestion on Monday.
Wouldn't you have to make the loginView control to have focus and then inside your loginView control, make whatever control you want to have focus there?
Tim
Timothy Bryan