Tab Index for a User Control

sj1187534

Centurion
Joined
Jun 10, 2003
Messages
108
Location
Dallas, Houston, etc.etc.
Hi...I have a couple of User Controls, one of them contains a dropdown list that loads a list of the US States from the database. When I have this user control in a form, along with many other textboxes, how do I make the tab index work?

Let us suppose I have two textboxes and the user control in a form. The tab index of the first textbox is 1, and that of the second textbox is 2. But if I want to move the control on the form to the usercontrol after the textbox2, how do I set up the tab index of the usercontrol. One way I can achieve that is by setting up the tabindex to 3 while creating the user control. But this is not going to work when I have more than two controls before the usercontrol in another form!!!

I hope you understood what I mean.

Thanks in advance,
SJ
 
if you set up the tab index inside the usercontrol, and then set a tabindex to the actual user control when you add it the page it should work.
 
Hi...I tried to do that. But I think you know that a user control does not have 'tabindex' attribute!! And of course, if we set up a tabindex to some number within the user control, we cannot re-use the control in another form as the position of the user control may vary.

SJ
 
Back
Top