How do I control tab order in .NET?

I have extensive experience with ASP, VB6, COM+, VBScript, JavaScript, HTML and HIS2000/COMTI. I am just getting started with .NET.

In ASP I was able to control the tab order of fields on the screen simply by positioning the fields where I wanted them in the HTML table. In .NET, the HTML is generated and I have no control over where the fields are located. How do I control tab order in .NET (hopefully without having to hard code the field names)? Thanks for your help.
The proper way of controlling tab ordering in HTML in general is through the use of the HTML tabindex attribute. All WebControl-inherited classes (so all built-in ASP.NET Server Controls) implement a TabIndex property you can use for that purpose. For HTML controls you can just add the attribute to the element declaration.

This was first published in March 2003

Dig deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: