Click here to Skip to main content
15,908,437 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
Table table = new Table();
            table.ID = "Table1";
            Page.Form.Controls.Add(table);
Posted
Updated 12-Jul-12 6:19am
v3
Comments
[no name] 12-Jul-12 12:21pm    
And this means what now you edited it to be completely meaningless?

1 solution

Hi,

As per I can see, you are adding the textboxes like this:
C#
TextBox tb = new TextBox();
tb.ID = "txtBox1" + i.ToString();
cell.Controls.Add(tb);
row.Cells.Add(cell);

Very easy to get the values. Just write the following code:
C#
for (int i = 0; i < 10; i++)
{
     TextBox tb = (TextBox)form1.FindControl(("txtBox1" + i.ToString()));
     string value = tb.Text; //Here you'll get your value of each textbox.
}


All the best.
--Amit
 
Share this answer
 

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