I need to loop through a collection and pass the values to a UserControl. It’s dynamic and I can’t figure out how to pass the parameter values. I’m using a repeater.
<asp:Repeater runat="server" id="Repeater1">
<ItemTemplate>
<uc1:testControl ID="testControl1" runat="server" />
</ItemTemplate>
</asp:Repeater>
In the code behind:
Repeater1.DataSource = _myCollection;
Repeater1.DataBind();
Any help would be greatly appreciated! Thanks
ASPX code:
Codebehind: