How to set focus on control in C#

You can put the focus on the following types of ASP.NET controls: Button, LinkButton, and ImageButton controls, CheckBox control, DropDownList control, FileUpload control, HyperLink control, ListBox control, RadioButton control, TextBox control.

The following C# code example shows how to set the focus on the control with the ID TextBox1:

protected void Page_Load(object sender, EventArgs e)