如何动态加载Web User Control?
kknew 2003-08-25 02:55:49 我做了几个Web User Control,这几个控件,我想对他们实时的进行加载。
如,有control1,control2,control3.
存在一个table.
Table table = new Table();
TableCell td = new TableCell();
switch(type)
{
case 1:
td.Controls.add(control1);
break;
case 1:
td.Controls.add(control2);
break;
case 1:
td.Controls.add(control3);
break;
}
TableRow tr = new TableRow();
tr.Cells.Add(td);
这样做是不行的,不知道,该如何去做?