كيفية وضع المؤشر على مربع النص
how setfocus for textbox
كود هنا
Public Function setfocus(ByVal TextBox As Control, ByVal mypage As Page)
mypage.RegisterStartupScript("SetFocus", "[script] document.getElementById('" & TextBox.ClientID & "').focus(); [script] ")
End Function
If txtusername.Text = "" Then
msgbox.show("Enter UserName.", Me.Page)
setfocus(txtusername, Me.Page)
Exit Sub
End If
