我有一个用户控件,它返回一个数据表,在某些情况下需要循环显示一个数据表。动态添加多个用户控件vb.net
我可以通过在页面中放置一个固定的placeholder
来动态地添加一个这样的实例。
我现在正在努力研究如何添加多个,因为我不知道可能需要多少个我不想对占位符进行硬编码。
我试过以下,但我刚开始一个实例,想必首先是由第二
覆盖我的HTML
<div id="showHere" runt="server"/>
VB
Dim thisPh As New PlaceHolder
thisPh.Controls.Add(showTable)
showHere.Controls.Add(thisPh)
Dim anotherPh As New PlaceHolder
anotherPh .Controls.Add(showTable)
showHere.Controls.Add(anotherPh)
如何我可以在showHere
div中添加重复表吗?
这样做!不知道为什么...无论如何,它现在工作!谢谢 – 2012-02-27 12:26:09