|
Hi,
I am using this code to bind news to the repeater using XMLDataSource. I want to ask, is it possible to have multiple XMLDataSources bineded to the same repeater so it will have xmlNews1, xmlNews2, xmlNews3, etc?
<asp:XmlDataSource ID="xmlNews" runat="server" XPath="/rss/channel/item/." DataFile="http://www.asp.net/community/articles/rss.ashx"></asp:XmlDataSource>
<asp:Repeater ID="repeaterNews" runat="server" DataSourceID="xmlNews">
<ItemTemplate>
<p>
<a href='<%#XPath("link")%>' target="_blank"><%#XPath("title")%></a>
</p>
</ItemTemplate>
</asp:Repeater>
|
|
|
|
|
You would require to merge all data source xmls into a single xml and then use it as XMLDataSource.
You may wish to use Linq To Xml to simplify your task.
|
|
|
|