How to display RSS FEED of other website to my site in asp.net?

bhargav picture bhargav · Jun 10, 2011 · Viewed 11.7k times · Source

I want to display RSS FEED of other website in my site made in ASP.NET. what should i do?

Answer

Saurabh picture Saurabh · Jun 10, 2011
<asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1">
    <ItemTemplate>
        Title: <a href="<%# XPath("link") %>"><%# XPath("title") %></a><br />
        Pulish Date: <%# XPath("pubDate") %><br />
        Description: <%# XPath("description") %>
        <hr />
    </ItemTemplate>
</asp:DataList>

<asp:XmlDataSource ID="XmlDataSource1" Runat="server"
        DataFile="http://z.about.com/6/g/electrical/b/rss2.xml"
        XPath="rss/channel/item">
</asp:XmlDataSource>