Tab index in an ASP.NET page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pratsadhu
    New Member
    • Mar 2007
    • 16

    Tab index in an ASP.NET page

    Hi,

    I have a page with a set of textboxes and dropdown lists. When using a tab to go from control to control, the sequence goes well till i arrive at a drop down. On selecting a particular item in the drop down,the page gets refreshed and the tab goes backto first textbox.

    Is there any way to set focus on the next control after dropdown?

    I tried using Focus method for the textbox on dropdown change and even set the indexes which turned out in vain.

    Thanks
    Prat
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Originally posted by pratsadhu
    Hi,

    I have a page with a set of textboxes and dropdown lists. When using a tab to go from control to control, the sequence goes well till i arrive at a drop down. On selecting a particular item in the drop down,the page gets refreshed and the tab goes backto first textbox.

    Is there any way to set focus on the next control after dropdown?

    I tried using Focus method for the textbox on dropdown change and even set the indexes which turned out in vain.

    Thanks
    Prat
    It sounds like you are using AutoPostBack on your dropdownlist. Do you need to autopostback for a specific reason. If not set AutoPostBack property to false and you should be able to tab to the next control without any problems.

    Nathan

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      If you need autopostback, do what is used for page-ing on GridViews and set a Session value with the tab index you are on

      Comment

      • pratsadhu
        New Member
        • Mar 2007
        • 16

        #4
        Thank you! It works now, i have used sessions to store the index values

        Originally posted by Plater
        If you need autopostback, do what is used for page-ing on GridViews and set a Session value with the tab index you are on

        Comment

        Working...