开发者

c# bind 2 lists to repeater

开发者 https://www.devze.com 2023-01-10 18:45 出处:网络
[c# linq] i have 2 datasources, 1 coming from an xml document and 1 coming from an sql ser开发者_如何学运维ver database, both return an IEnumerable<EventsDetails> is it possible to bind both of

[c# linq]

i have 2 datasources, 1 coming from an xml document and 1 coming from an sql ser开发者_如何学运维ver database, both return an IEnumerable<EventsDetails> is it possible to bind both of these lists to a single repeater?


You're probably looking for something like this, if you want to use LINQ:

var both= list1.Union(list2);

Then both is your data source.


Create a new list containing both. Or an object implementing IEnumetator which first returns elements from the first, then from the second list.

0

精彩评论

暂无评论...
验证码 换一张
取 消