Tuesday, 6 August 2013

C# + Binding repeater with list of collection

C# + Binding repeater with list of collection

I have repeater where I want to bind it with a list of collections,
usually I will return only one collection but for this case, the values to
be displayed on the repeater comes from multiple 'locations' hence I will
need to return more than one collection from multiple tables from my SQL
db. On my repeater, there are several
Text='<%#Eval("VALUE") %>
that requires the values from all the collections.
How do I go about binding multiple collections to a single repeater.
Thanks.
Apparently this will not work:
List<ValidationBase> lstOfCollection = apptBll.GetBuyingList(userId);
uirptBuyingList.DataSource = lstOfCollection;
uirptBuyingList.DataBind();

No comments:

Post a Comment