am using C#, VS-2005
am generate runtime controls like textBox and works it fine but the Indexing problems on it. my code below as follows.
//tbpoint Declare in GlobalArea.
int i=0;
TextBox tb= new TextBox();
tb.Location=tbpoint;
tb.Size=new size(970,60);
tb.Name="Tbox"+i.tostring();
tb.Keypress+=new KeypressEventHandler(tbb_Keypress);
tbpoint+=70;
i++;
this.panel1.Controls.Add(tb);
Above Code call in EnterKeypress Event and works fine but the problem is of Indexing the textboxes generated. The index not increment by 1.
How can I Solve It. Please Help Me.