Tabindex

Discussion in 'ASP .Net' started by kai, Jan 9, 2004.

  1. kai

    kai Guest

    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
     
    kai, Jan 9, 2004
    #1
    1. Advertising

  2. 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.)
     
    Steven Cheng[MSFT], Jan 9, 2004
    #2
    1. Advertising

  3. kai

    kai Guest

    Hi, Steven
    Thanks, it works.

    Kai
    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > 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.)
    >
     
    kai, Jan 9, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravikanth[MVP]

    TabIndex of DataGrids

    Ravikanth[MVP], Jul 18, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    346
    Deidre
    Jul 21, 2003
  2. Natty Gur
    Replies:
    1
    Views:
    1,892
    Marshal Antony
    Mar 3, 2004
  3. Jarod_24

    how does TabIndex work?

    Jarod_24, Apr 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    755
    Jarod_24
    Apr 5, 2004
  4. Jarod_24

    TabIndex

    Jarod_24, Apr 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,740
  5. niv

    tabindex on webform

    niv, Oct 17, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    364
Loading...

Share This Page