Introduction - If you have any usage issues, please Google them yourself
override public void SetFocus(System.Web.UI.Control ctrl)
{
StringBuilder s = new StringBuilder()
s.Append("<SCRIPT language=\"javascript\">"+ "\n")
s.Append("document.getElementById(\ "+ ctrl.ID+ "\ ).focus() "+ "\n")
s.Append("</SCRIPT>"+ "\n" )
RegisterStartupScript("focus", s.ToString())
}