สร้าง Sub SetFocusControl ไว้ในส่วนของ Code Behind

Public
Sub SetFocusControl(ByVal ControlName As String)
Dim script As String
= _
"<script language='javascript'>" + _
" var control = document.getElementById('" + _
ControlName + "');" + _
" if( control != null ) {control.focus();}" + _
"</script>"

Page.RegisterStartupScript("Focus", script)

End Sub

เรียกใช้

Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

ตัวอย่างให้ไป Focus ที่ TextBox1
SetFocusControl(TextBox1.ClientID)

TextBox1.Text = "Yahooooooooooooo"

End Sub