Click here to Skip to main content
15,886,110 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionbind multiple XMLDataSource to one Repeater Pin
Jassim Rahma15-Nov-12 3:19
Jassim Rahma15-Nov-12 3:19 
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?

XML
<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>

AnswerRe: bind multiple XMLDataSource to one Repeater Pin
Anurag Gandhi15-Nov-12 21:20
professionalAnurag Gandhi15-Nov-12 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.