pls help me sir, in my project i want to create table of controls at runtime, so i use the method given below
public void createcontrol(int id) { TableRow r = new TableRow();
TableCell d = new TableCell(); Label empname = new Label(); empname.Text="irfad"; empname.ID = "empname" + id.ToString(); d.Controls.Add(empname); TableCell c = new TableCell(); TextBox openingbalance = new TextBox(); openingbalance.ID = "openingbalance" + id.ToString(); c.Controls.Add(openingbalance); r.Cells.Add(c); Table1.Rows.Add(r); } so in each row the id of each control will be change, ie id of the label empname like, empname0, empname1, etc.
here i have a problem like i'm not able to access these controls,i want to access each controls seperately, i hope think we can access the controls based on control id. But here it is not recognized. what will i do sir, please help me sir.............
|