Click here to Skip to main content
Click here to Skip to main content

Read RSS FEED data (

By , 10 Nov 2011
Rate this:
Please Sign up or sign in to vote.
In this post, we will see how to read RSS Feed data & show it on our web site.
To start with, we need to know from where we are going to read RSS feed data. In this example, we will read RSS feed data from site, where recent posts are available.
Let’s say there is a blog spot as, then RSS feed data would be available at So this is the source data for us to work with.
Now start with code part:
  1. First let's add DataGrid to our web page, with one template column as shown below:
            <asp:DataGrid runat="server" ID="myPosts" AutoGenerateColumns="False">
                    <asp:TemplateColumn HeaderText="My Posts">
                            <a href="<%# DataBinder.Eval(Container.DataItem, " link=")%>">
                                <%# DataBinder.Eval(Container.DataItem, "title") %>
  2. In our page load, let's declare XMLTextReader object & this will take RSS FEED URL. In this example, I am using my blogspot URL:
    XmlTextReader reader = new XmlTextReader("");
  3. We will declare Dataset:
    DataSet ds = new DataSet();
  4. To read XML data & read into DS, let's use the below code:
  5. As we have dataset object filled up with RSS feed data, let's assign Dataset to datagrid as below:
    myPosts.DataSource = ds;
  6. Dataset object would contain properties in the form of Link & Title, which we have used in our .aspx code i.e. step 1.
  7. Now execute the code & see the output.
Happy coding… hope this helps!


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

About the Author

Bangla Gopal Surya Prakash
Software Developer (Senior)
United States United States
B.Tech graduate in CSE, having experience in .Net related Technologies & Microsoft Certified Professional in .NET Framework 2.0 & 4.0.
My interests are Coding, Writing complex Queries [like d most], reading [technical stuff] and listening to music, playing Cricket, Table Tennis.

Comments and Discussions

Questioncommnet PinmemberSarah MQ16-Feb-14 20:38 

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

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

| Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 10 Nov 2011
Article Copyright 2011 by Bangla Gopal Surya Prakash
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid