Click here to Skip to main content
13,456,914 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 8 Nov 2011

Read RSS FEED data (

Rate this:
Please Sign up or sign in to vote.
Read RSS FEED data (
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

You may also be interested in...


Comments and Discussions

Questioncommnet Pin
Sarah MQ16-Feb-14 20:38
memberSarah MQ16-Feb-14 20:38 

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.

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