| |||||||
WebControl.TabIndex PropertySystem.Web.UI.WebControls Namespace WebControl Class Sets or retrieves the position of the control in the tabbing order for the current document. Syntax
Property Value
This value must be a number between 0 and 32767. You can remove a control from the tab order, though, by setting TabIndex to -1. This property is read/write with a default value of 0. RemarksTabIndex is used to specify or determine the tabbing order of elements on a Web Forms page. Tabbing to a control sets focus to that control. The tabbing order defines the sequence in which controls will receive focus when navigated by the user via the keyboard. The tabbing order may include controls nested within other controls. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the addess bar. Next, tab selection order is determined by the value of TabIndex as follows:
The actual key sequence that causes tabbing navigation or element activation depends on the configuration of the user agent, but in general, the Tab key is used. User agents may also define key sequences to navigate the tabbing order in reverse, such as Shift+Tab. When the end ( or beginning ) of the tabbing order is reached, user agents usually loop back to the beginning ( or end ). This feature requires Microsoft® Internet Explorer® 4 and later. ExampleThe following example shows how to declaratively set the TabIndex property of a Web control at design time. <asp:textbox id = "myTextBox" tabindex=1 runat = "server" /> The example below shows how to programmatically set the TabIndex property at run time, depending on user input. Note that when multiple controls share the same TabIndex, the sequence follows the order in which the elements appear in the HTML source. See AlsoWebControl Members Base Web Control Properties |
| ||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme