[csharp]
protected void Page_Load(object sender, EventArgs e)
{
TextBox usernameControl = Login1.FindControl(”UserName”) as TextBox; // Change Login1 to the name of your Login Control
if (usernameControl != null)
Page.SetFocus(usernameControl);
}

[/csharp]