H
haiwen
hello, everyone:
I need to programmatically generate web control on a page.
such as:
for(int i=0;i<4;i++)
{
Label l=new Label();
l.Text="name "+i;
TextBox t=new TextBox();
t.ID=i.ToString();
t.Text="txt "+i;
Label l2=new Label();
l2.Text="<br>";
PlaceHold1.Controls.Add(l);
PlaceHold1.Controls.Add(t);
PlaceHold1.Controls.Add(l2);
}
but I can not get the content of those TextBox on server
side. could anyone help?
haiwen
I need to programmatically generate web control on a page.
such as:
for(int i=0;i<4;i++)
{
Label l=new Label();
l.Text="name "+i;
TextBox t=new TextBox();
t.ID=i.ToString();
t.Text="txt "+i;
Label l2=new Label();
l2.Text="<br>";
PlaceHold1.Controls.Add(l);
PlaceHold1.Controls.Add(t);
PlaceHold1.Controls.Add(l2);
}
but I can not get the content of those TextBox on server
side. could anyone help?
haiwen