Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
Hi I am using this code to get RSS Feed in my website and it work very good but it get feed only from one website i want to display feeds from more then website in same time pls help me

string x = "";

           XmlTextReader reader = new XmlTextReader(x);
           DataSet ds = new DataSet();
           DataList1.DataSource = ds.Tables["item"];

<asp:DataList ID="DataList1" runat="server" Width="100%">
                <div class="RSSTitle"><asp:HyperLink ID="TitleLink" runat="server" Text='<%# Eval("title") %>' NavigateUrl='<%# Eval("link") %>'/></div>
                <div class="RSSSubtitle"><asp:Label ID="SubtitleLabel" runat="server" Text='<%# Eval("description") %>' /></div>
                <div class="RSSInfo">
                    posted on <asp:Label ID="DateRSSedLabel" runat="server" Text='<%# Eval("pubDate", "{0:d} @ {0:t}") %>' />

Thank You...

1 solution

Not much familiar with the RSS feed with ASP .NET, but here's a thing you can do (Basic Idea) -

1. Get RSS Feeds from different URLs and maintain DataTable foreach feed.
2. Club all the DataTables in a new DataTable. Use DataTable.Merge Method[^] for that. (Example[^])
3. And then bind that new DataTable with the DataList.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900