By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,694 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,694 IT Pros & Developers. It's quick & easy.

Tabindex

P: n/a
kai
Hi, All
I try to setup Tebindex in ASP.NET page like in Windows form, using
Tabview, but cannot fnd it. In the properties windows in ASP.NET, change
Tabindex does not change
the tab order. How can setup the tab order in ASP.NET?

Thanks

Kai
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi kai,
Thank you for using Microsoft Newsgroup Service. Based on your description,
you have some problem with setting the tabindex for the web controls on the
ASP.NET web page. Is my understanding correct.

In asp.net web page, you can set all the controls' tabindex attribute in
the property window, nomatter it's a ASP.NET server control or a html
control. However, since in the web page, some element is unable to get
focus such as text(lable), so you may sometimes feel they are not set focus
as the tabIndex they've been set. Also, I've tested use a simple
aspx page to set tabindex for both server controls and html controls, you
may try out this page to see whether it works:

------------------aspx page--------------------
<HTML>
<HEAD>
<title>TabIndex</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<table width="600" align="center">
<tr>
<td>
<asp:TextBox id="TextBox1" tabIndex="1"
runat="server"></asp:TextBox></td>
<td>
<asp:Button id="Button1" tabIndex="5" runat="server"
Text="Button"></asp:Button></td>
</tr>
<tr>
<td>
<asp:ImageButton id="ImageButton1" tabIndex="2"
runat="server"></asp:ImageButton></td>
<td>
<asp:DropDownList id="DropDownList1" tabIndex="6" runat="server">
<asp:ListItem Value="aaa" Selected="True">aaa</asp:ListItem>
<asp:ListItem Value="bbb">bbb</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td>
<asp:ListBox id="ListBox1" tabIndex="3" runat="server">
<asp:ListItem Value="aaa" Selected="True">aaa</asp:ListItem>
<asp:ListItem Value="bbb">bbb</asp:ListItem>
<asp:ListItem Value="ccc">ccc</asp:ListItem>
</asp:ListBox></td>
<td>
<asp:CheckBox id="CheckBox1" tabIndex="7" runat="server"
Text="CheckItem"></asp:CheckBox></td>
</tr>
<tr>
<td><INPUT tabIndex="4" type="text"></td>
<td><INPUT tabIndex="8" type="button" value="Button"></td>
</tr>
</table>
</form>
</body>
</HTML>
------------------------------------------

If you have any questions or need any help, please feel free to post here .

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #2

P: n/a
kai
Hi, Steven
Thanks, it works.

Kai
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:SI**************@cpmsftngxa07.phx.gbl...
Hi kai,
Thank you for using Microsoft Newsgroup Service. Based on your description, you have some problem with setting the tabindex for the web controls on the ASP.NET web page. Is my understanding correct.

In asp.net web page, you can set all the controls' tabindex attribute in
the property window, nomatter it's a ASP.NET server control or a html
control. However, since in the web page, some element is unable to get
focus such as text(lable), so you may sometimes feel they are not set focus as the tabIndex they've been set. Also, I've tested use a simple
aspx page to set tabindex for both server controls and html controls, you
may try out this page to see whether it works:

------------------aspx page--------------------
<HTML>
<HEAD>
<title>TabIndex</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<table width="600" align="center">
<tr>
<td>
<asp:TextBox id="TextBox1" tabIndex="1"
runat="server"></asp:TextBox></td>
<td>
<asp:Button id="Button1" tabIndex="5" runat="server"
Text="Button"></asp:Button></td>
</tr>
<tr>
<td>
<asp:ImageButton id="ImageButton1" tabIndex="2"
runat="server"></asp:ImageButton></td>
<td>
<asp:DropDownList id="DropDownList1" tabIndex="6" runat="server">
<asp:ListItem Value="aaa" Selected="True">aaa</asp:ListItem>
<asp:ListItem Value="bbb">bbb</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td>
<asp:ListBox id="ListBox1" tabIndex="3" runat="server">
<asp:ListItem Value="aaa" Selected="True">aaa</asp:ListItem>
<asp:ListItem Value="bbb">bbb</asp:ListItem>
<asp:ListItem Value="ccc">ccc</asp:ListItem>
</asp:ListBox></td>
<td>
<asp:CheckBox id="CheckBox1" tabIndex="7" runat="server"
Text="CheckItem"></asp:CheckBox></td>
</tr>
<tr>
<td><INPUT tabIndex="4" type="text"></td>
<td><INPUT tabIndex="8" type="button" value="Button"></td>
</tr>
</table>
</form>
</body>
</HTML>
------------------------------------------

If you have any questions or need any help, please feel free to post here ..
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.