Labels

Flash (1)

Monday, October 04, 2004

Seting Initial Focus

How do you set initial focus on a web control in VB.NET?

Manually edit the HTML code for your webform.
Inside the body tag, place the following code:

onload="Form1.yourcontrolnameTexBox.focus()"


NOTE: The form name is found in the ID tag in the HTML code of the webform. The textbox ID is in the properties of the control.

No comments: