Ask the Expert

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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: