Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
SetFocus(TextBox2)
End Sub
Protected Sub SetFocus(ByVal ctrl As System.Web.UI.Control)
Dim s As String = "<SCRIPT language='javascript'>document.getElementById('" _
& ctrl.ID & "').focus() </SCRIPT>"
Me.RegisterStartupScript("focus", s)
End Sub