Friday, August 06, 2010

Consuming RSS Feeds in your ASP.NET website

Yesterday my friend suggested me to publish Feeds of my Blog on my company website, and I too liked this idea, so decided to update the website. now question is how to consume those RSS feeds in ASP.NET Page ?
There are various ways to use this, you can search for some standard third-party controls, or you can use JavaScript for this, but I think the simplest way is use XMLDataSource, because if you have checked the format of RSS feed then you must be knowing that RSS is nothing but XML file. and once you created this XMLDataSource then you can easily bind this with standard ASP.NET controls like DataList, Labels, Hyperlink etc. so lets see how we can do this in simple 4-5 steps.

  • Open Visual Studio and Create a Website or a web application Project.
  • on Default.aspx page in design area just drop a XMLDataSource control from Toolbox.