Hi!
I'm creating a custom Server Control which implements the method in the
subject line (Protected override void CreateChildCont rols)
In here I have the following code:
LBL myLbl = new LBL();
myLbl.ID = "MyLbl";
myLbl.Text = objCustomFieldU til.GetName("cu stom");
this.Controls.A dd(new LiteralControl( "<td class=\"regLabe lCell\">"));
this.Controls.A dd(myLbl);
this.Controls.A dd(new LiteralControl( "</td>"));
Now what I'd like to do is add the child controls dynamically by looping
through a Data Table:
for(int i = 0; i < objDT.Rows.Coun t; i++)
{
//Implement Adding Controls here
}
The problem arises that I need to declare my label or textbox before I can
added it. Anyone know a way around this?
Thank you.