In this project I am using a users input to create textboxes dynamically. Here is my original code for this:
int ReqPO = Convert.ToInt32(txtReqPONum.Text);
int n = ReqPO;
for (int i = 0; i < n; i++)
{
TextBox MyTextBox = new TextBox();
//Assigning the textbox ID name
MyTextBox.ID = "txtPOAmount" + "" + ViewState["num"] + i;
this.Form.Controls.Add(MyTextBox);
}
And then here I try to nest the functionality into a loop...but it does not go so well. I want to put one textbox into one cell inside of one wor depending on the users input:
Table table1 = new Table();
TableRow tr = null;
TableCell tc = null;
int ReqPO = Convert.ToInt32(txtReqPONum.Text);
int n = ReqPO;
for (int a = 0; a < n; a++)
...
Go to the complete details ...