Simple RSS Feed Display

This demo illustrates displaying the RSS <item> elements from a remote RSS feed using a DataGrid. Note that the code to accomplish this is about five lines long! (Also note that the data shown in this demo is a snapshot of the RSS feed's data from Monday, March 17th. A static RSS feed is used to reduce load on the ASPMessagboard.com server.)


titlelinkpubDateitem_Iddescriptionchannel_Id
What's New in ASP.NET 4.5 and Visual Studio 2012https://www.asp.net/visual-studio/overview/2012/whats-new-in-aspnet-45-and-visual-studio-2012Fri, 19 Aug 2016 13:33:46 -08000 This document describes new features and enhancements that are being introduced in ASP.NET 4.5. It also describes improvements being made for web development in Visual Studio 2012.0
Getting Started with ASP.NET Web APIhttps://www.asp.net/aspnet/overview/building-web-apis-with-aspnet/getting-started-with-aspnet-web-apiTue, 19 Jul 2016 19:58:33 -08001 In this tutorial, you will create your first HTTP service using ASP.NET Web API.0
Getting Started with ASP.NET MVChttps://www.asp.net/aspnet/overview/making-websites-with-aspnet/getting-started-with-aspnet-mvcTue, 19 Jul 2016 19:45:34 -08002 This tutorial series will teach you the basics of building an ASP.NET MVC application.0
Introducing ASP.NET Web Pageshttps://www.asp.net/aspnet/overview/making-websites-with-aspnet/introducing-aspnet-web-pagesTue, 19 Jul 2016 19:42:21 -08003 These articles will get you started with ASP.NET Web Pages.0
Getting Started with ASP.NET Web Formshttps://www.asp.net/aspnet/overview/making-websites-with-aspnet/getting-started-with-aspnet-web-formsTue, 19 Jul 2016 19:40:18 -08004 This tutorial series will teach you the basics of building an ASP.NET Web Forms application0
ASP.NET 4.5 and Visual Studio 2012https://www.asp.net/visual-studio/overview/2012/aspnet-45-and-visual-studio-2012Tue, 21 Jun 2016 20:24:26 -08005 The .NET Framework 4.5 includes enhancements for ASP.NET 4.5. Visual Studio 2012 also includes enhancements and new features for improved web development. This document provides an overview of many...0
ASP.NET Identity Tips (Video)https://www.asp.net/identity/videos/getting-started/aspnet-identity-tips-videoTue, 21 Jun 2016 19:06:03 -08006 This video contains tips for securing your web app with ASP.NET Identity.0
ASP.NET Identity: Two-Factor Authentication (Video)https://www.asp.net/identity/videos/getting-started/aspnet-identity-two-factor-authentication-videoTue, 21 Jun 2016 19:05:27 -08007 This video explains how to use Two-Factor Authentication with ASP.NET Identity.0
ASP.NET Identity (dotnetConf 2014)https://www.asp.net/identity/videos/getting-started/aspnet-identity-dotnetconf-2014Tue, 21 Jun 2016 19:04:28 -08008 ASP.NET Identity is a totally rewritten framework that brings the ASP.NET membership system into the modern era. ASP.NET Identity makes it easier to integrate different authentication systems such...0
Azure Active Directory Video Serieshttps://www.asp.net/identity/videos/getting-started/azure-active-directory-video-seriesTue, 21 Jun 2016 19:03:41 -08009 This link opens the first in a series of videos about Azure Active Directory, presented by Scott Hanselman and the Microsoft program manager for Azure Active Directory, Vittorio Bertocci. The video...0
Introduction to ASP.NET Identity (Video)https://www.asp.net/identity/videos/getting-started/introduction-to-aspnet-identity-videoTue, 21 Jun 2016 19:02:49 -080010 Follow the informative and entertaining team of Adam Tuliper and Jeremy Foster, as they explain everything you need to know to implement, extend, and customize ASP.NET Identity.0
ASP.NET Identity Videoshttps://www.asp.net/aspnet/videos/identity/aspnet-identity-videosTue, 21 Jun 2016 18:59:32 -080011 0
ASP.NET SignalR Videoshttps://www.asp.net/aspnet/videos/signalr/aspnet-signalr-videosTue, 21 Jun 2016 18:58:26 -080012 0
ASP.NET Web API Videoshttps://www.asp.net/aspnet/videos/web-api/aspnet-web-api-videosTue, 21 Jun 2016 18:57:17 -080013 0
ASP.NET MVC Videoshttps://www.asp.net/aspnet/videos/mvc/aspnet-mvc-videosTue, 21 Jun 2016 18:55:18 -080014 0
ASP.NET Web Forms Videoshttps://www.asp.net/aspnet/videos/web-forms/aspnet-web-forms-videosTue, 21 Jun 2016 18:53:22 -080015 0
ASP.NET Web Pages Videoshttps://www.asp.net/aspnet/videos/web-pages/aspnet-web-pages-videosTue, 21 Jun 2016 18:52:39 -080016 0
ASP.NET 3.5 and Visual Studio 2008https://www.asp.net/aspnet/overview/previous-versions/aspnet-35-and-visual-studio-2008Tue, 21 Jun 2016 11:52:04 -080017 0
ASP.NET 4 and Visual Studio 2010https://www.asp.net/aspnet/overview/previous-versions/aspnet-4-and-visual-studio-2010Tue, 21 Jun 2016 11:51:39 -080018 0
ASP.NET 4.5 and Visual Studio 2012https://www.asp.net/aspnet/overview/previous-versions/aspnet-45-and-visual-studio-2012Tue, 21 Jun 2016 11:51:18 -080019 0


Source Code
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Data" %>
<script language="VB" runat="server">
  Sub Page_Load(sender as Object, e as EventArgs)
    recentPosts.DataSource = GetRSSFeed("http://www.asp.net/news/rss.ashx")
    recentPosts.DataBind()      
  End Sub


  Function GetRSSFeed(strURL as String) as DataTable
    'Get the XML data
    Dim reader as XmlTextReader = New XmlTextReader(strURL)
    
    'return a new DataSet
    Dim ds as DataSet = New DataSet()
    ds.ReadXml(reader)    
    Return ds.Tables(2)
  End Function
</script>
  
<asp:DataGrid runat="server" id="recentPosts" />

[Return to the article]