Click here to Skip to main content
15,886,772 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to apply tabbing in aspx form controls including dynamic controls ,so how can i apply tabindex dynamicly from code behind page.
Thanks
Posted

1 solution

C#
private void button1_Click(object sender, EventArgs e)
       {
           TextBox tx = new TextBox();
           tx.Width = 150;
           tx.Height = 20;
           tx.Name = "textbox1";
           tx.TabIndex = 1;
           tx.Location = new Point(50, 10);
           this.Controls.Add(tx);
       }
 
Share this answer
 
Comments
sharad_sharma82 30-Jan-12 3:50am    
You have speicfied the tabindex 1 which is fixed but i am creating controls using for each loop ,and in my form i have 32 controls so i want to start tabbing 32+1 when i create controls using for loop so when i start tabbing its work on serial order .
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900