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

RSS Feed using ASP.NET 2.0

, 9 Jan 2006
Rate this:
Please Sign up or sign in to vote.
This RSS Feed example will explain how to consume an RSS Feed in eight easy steps..!


This article will explain how to consume an RSS Feed from another website using ASP.NET 2.0. I have tried to keep this article very simple so that even beginners can easily understand this. This article will explain to you how to use RSS Feeds in eight easy steps using ASP.NET 2.0!


Before you start reading/implementing the steps using this article, hope you are aware of RSS Feeds. RSS means Really Simple Syndication. Nowadays, every dynamic web site, has this feature named RSS. Using RSS Feeds, you can be in sync with the changes/additions made to your favourite shopping website or your favourite techie blog website.

Using the code

OK. Let's start. Please follow the following seven easy steps and your RSS Feed webpage will be ready to consume RSS from a given website:

  1. Start -> Programs -> Microsoft Visual Web Developer 2005 Express Edition.

  2. Now, go to File -> New Website to create a new website. Select Location=File System, Language=Visual Basic, and give the default web site path (by default, it will create a new website at C:\Documents and Settings\default\My Documents\Visual Studio 2005\WebSites).

  3. Then, drag the XMLData source component from Toolbox -> Data -> XMLDataSource to the blank WebForm.

  4. Click on XMLDataSource Tasks - > Configure Data Source link to configure the data source. Now, this is the actual thing in the whole project.

  5. Then, you will see the ConfigureDataSource window which has the following paths to be specified to consume the XML data:
    • Data File = Data file will be your RSS Feed path. In my case, it is
    • Transformation File = we are not currently using any XML transformation file, so leave it blank.
    • XPath Expression = again, this is very much important. An XPath variable will be used later on in our code to get the specific RSS Feed link. Give it as rss/channel/item now.
  6. The next step is to drag the DataList control from Toolbox -> Data -> DataList to the WebForm.

  7. Then, click on the Choose Data Source dropdown for the DataList and select XMLDataSource1.

  8. And then the final step. Switch to the HTML Source View of the WebForm and paste the following code:

    And then, press F5 in your project to Run the project. Please refer the example source file for any further details.


Q-1. How should I obtain the RSS feed path?

Ans. You will require a path to the RSS Feed from any given website to actually consume the RSS Feed of that website. In my example, I have used, but you can use any RSS path. To get the RSS feed path from any website, try to locate the word RSS or look for its image in the website. Then click on RSS or XML, your browser will be redirected to the XML formatted page. Now copy the link form IE.




This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Maulik Soni
Other Cincinnati Children's Biomedical Informatics
United States United States

Comments and Discussions

QuestionRSS Feed Consumer Pinmembernihantanu31-Aug-12 2:42 
Questionthis is my error so plz help me Pinmemberhimeshpandiyaa9-Nov-11 20:43 
GeneralMy vote of 5 PinmemberMontyEsoft29-Sep-10 4:37 
GeneralMy vote of 1 Pinmemberjorgepitgh20-Jul-10 6:24 
GeneralRelated To ur Post PinmemberRohitKabadi21-Jan-10 21:29 
GeneralMy vote of 1 PinmemberMuthuganesh28-Sep-09 20:09 
GeneralMy vote of 1 PinmemberMuthuganesh28-Sep-09 20:09 
GeneralMy vote of 1 PinmemberMuthuganesh28-Sep-09 20:08 
QuestionLinks not opening in new window.. PinmemberMSRAHUL11-May-09 3:36 
I have created an RSS Feed in my application. I have set values for all essential values for RSS. The description attribute is set as a string that is obtained by calling a method. now What that method is doing is that it creates HTML like :
RSSCourseDisplayDetails.Append("<table><tr><td><img src='" + Global.SiteRootPath + "/Local/Images/VRM/btnLaunch.png'></td><td><a href=" + sqlDr["Course_External_URL"].ToString() + " target="+"_blank "+ " >Launch/Register</a></td></tr></table>");...........and so on…..

As you can see I have used sqlDr a DataReader to read rows returned by a stored proc in SQL Server.
So the String Builder is appended more HTML like that. and thus the whole description of the RSS item is created in tabulated format.
The issue that I am facing is that target="_blank" does not work. The link redirects to the new page in the same browser window.
I want it to open in a new browser window....Please help..
AnswerRe: Links not opening in new window.. Pinmemberdotnetrangarajesh24-Nov-11 19:21 
GeneralLinks not opening in new window PinmemberMSRAHUL11-May-09 3:34 
QuestionHow to Combine Rss Feed data comes from more than one rss feed? PinmemberYadav A Kumar11-Nov-08 8:10 
GeneralRss file Pinmemberumeshdaiya15-Jul-08 23:16 
GeneralRSS Feed detail Pinmemberaspmike5-Mar-08 11:53 
GeneralUnable to locate RSS feed... Pinmemberkrishnaveer13-Nov-07 21:00 
GeneralDoesnt work PinmemberDarynRoberts20-Aug-07 0:27 
GeneralShow only last x posts PinmemberFalkenberg30-Jan-07 4:39 
GeneralMy Forum RSS Feed PinmemberRadioButton30-Jun-06 13:59 
GeneralRSS Feed doesn't work, once deployed in the IIS PinmemberDilumt4-May-06 0:06 
GeneralRe: RSS Feed doesn't work, once deployed in the IIS Pinmembermssoni4-May-06 4:23 
GeneralRe: RSS Feed doesn't work, once deployed in the IIS PinmemberDilumt4-May-06 18:13 
GeneralRe: RSS Feed doesn't work, once deployed in the IIS PinmemberKanedogg0826-Dec-07 20:01 
GeneralRe: RSS Feed doesn't work, once deployed in the IIS Pinmemberpvnpras4-May-11 3:58 
JokeRSS Toolkit PinmemberMohamed A. Meligy1-May-06 19:56 

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 | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 9 Jan 2006
Article Copyright 2006 by Maulik Soni
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid