In a foreach loop i'm adding a textbox dynamically, I want to enter some text dynamically so that i can read and store the text into a variable ON BUTTON CLICK private void tab_sub(DataTable dt2, Table tbl) { TableRow tr; TableCell tc; foreach (DataRow dr in dt2.Select("", "")) { tr = new TableRow(); tc = new TableCell(); tc.Text = dr["DNAME"].ToString(); tr.Controls.Add(tc); tc = new TableCell(); tc.Text = dr["MNAME"].ToString(); tr.Controls.Add(tc); tc = new TableCell(); tc.Text = dr["ID"].ToString(); tr.Controls.Add(tc); Textbox tb = new TextBox(); tc = new TableCell(); tb.Text = ""; tb.ID = "T" + county; tc.Controls.Add(tb); tr.Controls.Add(tc); tbl.controls.add(tr); }
↧
How to read the dynamically created textbox value?
↧