The best way is use some data control which has your usecontrol in itemtemplate and to be binded with a set of objects to create multiple usercontrols.
You can also use dynamic control, which is exactly like old vb6. However, to handle the postback data and events, you have to create the control array during page_oninit each time it post back before handling postback data.
Cheng Bao
Member
191 Points
126 Posts
Re: How to show a usercontrol five or a variable number of times without naming them individually
Mar 01, 2012 05:50 PM|LINK
The best way is use some data control which has your usecontrol in itemtemplate and to be binded with a set of objects to create multiple usercontrols.
You can also use dynamic control, which is exactly like old vb6. However, to handle the postback data and events, you have to create the control array during page_oninit each time it post back before handling postback data.