System.Web.UI Namespace Page Class
.NET Framework version 2.0
Sets the browser focus to the specified control.
1. Sets the browser focus to the specified control.
2. Sets the browser focus to the control with the specified identifier.
The following example demonstrates using the SetFocus method.
NOTE: This example shows how to use one of the overloaded versions of SetFocus. For other examples that might be available, see the individual overload topics.
void Page_Init ( object sender, EventArgs e ) {
SetFocus ( searchBox );
}
Sub Page_Init ( sender As Object, e As EventArgs )
SetFocus ( searchBox )
End Sub 'Page_Init |
|
C# |
VB |
Page Members