Code snippet to create a textbox control for n number of times,
int n=5;
for (int i=0;i<n;i++)
{
TextBox MyTextBox=new TextBox();
MyTextBox.ID = "tb" +""+ ViewState["num"] + i;
MyTextBox.Width = 540;
MyTextBox.Height = 60;
MyTextBox.TextMode = TextBoxMode.MultiLine;
this.Controls.Add(MyTextBox);
}
I hope this could help you.
With regards
R.K.