Tabindex

K

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
 
S

Steven Cheng[MSFT]

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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top