• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

Tab Order toolbutton disabled - trying to update tab index on a web page with many fields VS 2008

I have an ASP web form with many fields. I just added a field toward the top and now I need to update all the tab indexed on the page. (I have a content place holder which refers to a master page.) Supposedly I can easily update tabindexes on some dialogue box instead of extremely tediously going to each control clicking on properties and updating each tab index. I also see a tool button "Tab Order" which I can't seem to get enabled.

What's the trick?
0
daedalux
Asked:
daedalux
1 Solution
 
daedaluxAuthor Commented:
I have found out that VS 2008 only has a GUI for setting tab indexes in win forms, NOT web forms.

I also have found a programmatic solution, which makes it very easy to maintain whenever I want to reorder the fields or insert a new one any time down the road.

See example.
// Called on Page_Load:

    private void SetTabbingOrder()
    {
        short i = 0;
        textbox1.TabIndex = ++i;
        dropdown.TabIndex = ++i;
        textbox2.TabIndex = ++i;
        checkbox.TabIndex = ++i;
        // etc
    }

Open in new window

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now