In earlier versions of ASP.NET, assigning focus to a control involves writing
client-side script (such as JavaScript). In ASP.NET 2.0, this process
has been much simplified, and you can now set the focus of a control via
its Focus() method. Like
txtName.Focus();
You can also set the focus of a control through the SetFocus( )
method of the Page class. The syntax is:
Page.SetFocus(controlName);
Apart from this you can use defaultfocus attribute to set the control that will be
assigned the focus when the form is loaded.
< form id="form1" runat="server"
defaultfocus="txtEmail"
>