Tab key order in ASP. NET web server controls

Source: Internet
Author: User
Although ASP. NET Web controls look similar to the winform control of c #, and both have the tabindex attribute, however, the "tab key order" function in the layout toolbar is not open to Web controls. net webform developers are also somewhat stingy.

No way, you can manually set the tabindex attribute for each control. The effect can still be achieved.

Note: The control to obtain the focus is numbered sequentially. We recommend that you set the tabindex of the first control to 1 instead of 0.

When I open IE, of course, it is not just the control on your web page that requires focus, address bar, go to button, page tag, and so on. I use Windows Vista + IE7, this problem occurs when I log on to the window. If textbox1.tabindex = 0 and textbox2.tabindex = 1 are entered as the user name, the address bar first gets the focus when opening the webpage, switch the tab key to get the focus in sequence: IE (Refresh button, page search input box, page search button, favorites button, current page tag), webpage (password input box, login, cancel ,...... Username input box), and then return to the items in IE, that is, the two input boxes that were originally tied together. After the first one obtains the focus, it cannot be directly transferred to another input box by tab or SHIFT + TAB. I don't know whether the problem is IE or my problem. If you have such trouble, you can set the value of tabindex from 1 and solve it.

Http://msdn2.microsoft.com/zh-cn/library/ms178231 (vs.80). aspx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.