c# - Get text from dynamically created TextBox -


i have button when clicked creates textboxes dynamically:

        (int = 0; < length; i++)         {          name.add(new textbox());          system.drawing.point locate = new system.drawing.point(137, 158 + * 25);          (name[i] textbox).location = locate;          (name[i] textbox).size = new system.drawing.size(156, 20);          starttab.controls.add(name[i] textbox);          } 

i want text entered in name[i] convert string set labels

you can use control.controlcollection.find.

updated:

textbox txtname =  (textbox)this.controls.find("txtnameoftextbox", true)[0];  if (txtname != null) {     return txtname.text; } 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -