【发布时间】:2012-03-16 21:18:30
【问题描述】:
我有一个用户控件,它返回一个数据表,在某些情况下需要循环显示一个在另一个之上。
我可以通过在页面中放置一个固定的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 中添加重复的表格?
【问题讨论】:
标签: asp.net vb.net user-controls placeholder dynamic-controls