The problem u have is how to access the dynamically created textboxes, isn't it ok look, the code u had written actually creates a number of objects of type TextBox, and give every one a name that is 'TextBoxName1', 'TextBoxName2',.. etc the problem here is how to access the objects created. so, you must declare a generic dictionary of string and TextBox on the class level, means
Dictionary AllTextBoxes = new
Dictionary ();
this code will be in the class level not inside any methods. the second step is to add a line inside the loop to add items to this dictionary, each of them consists of a key and a value, the key is the name of textbox, while the value is the textbox object created in each loop, this line will be at the end of loop,
AllTextBoxes.Items.Add("TextBoxName" + i.ToString(), tb);
now, u can access any textboxe through the dictionary when giving the name of textbox like this
string aaa = AllTextBoxes["TextBoxName1"].Text;
I hope this is usefull Dr Sayed Tohamy, Egypt