Here is the approach:
First create a method in your utility or helper class.
And call this method in your page. Following is the example to set focus on a text box with ID TextBox1:
Similarly, you can even set focus to other types control like CheckBox, RadioButton, Button etc. as well. Following is the example to set focus on a Button: