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.)


titledescriptionlinkauthorpubDatechannel_Id
ASP.NET MVC 2 RTM Now AvailableASP.NET MVC is a free, fully supported framework to quickly build powerful, standards-based Web sites. Read our What's New in ASP.NET MVC 2 document or visit our ASP.NET MVC section to learn more.http://www.asp.net/mvc/ASP.NET NewsThu, 11 Mar 2010 05:00:00 GMT0
ASP.NET and Silverlight Conference with Scott Guthrie and Visual Studio 2010 Launch! Hear Scott Guthrie and key speakers talk about Silverlight 4, ASP.NET 4.0, MVC, AJAX etc - and see how it’s all supported in Visual Studio 2010! We'll even throw in the global Launch of Visual Studio 2010! Early bird ends March 8!http://go.microsoft.com/?linkid=9714331ASP.NET NewsSat, 27 Feb 2010 05:00:00 GMT0
Enhance Your Web Application with Components from the ASP.NET Control GalleryAdd social bookmarking, time and weather, file and folder browsing, and more to your web applications with the newest components in the ASP.NET Control Gallery!http://www.asp.net/community/control-gallery/ASP.NET NewsWed, 24 Feb 2010 14:00:00 GMT0
New Articles and Updates to the ASP.NET WikiExpand and share your knowledge about Provider Factory, Xml Serializer, ASP.NET Chart, and more in the ASP.NET Wiki. Earn Community Recognition points by contributing!http://wiki.asp.net/ASP.NET NewsTue, 23 Feb 2010 05:00:00 GMT0
Listen to Four New PodcastsDon't miss The Misfit Geek's chat with Silverlight Geek Jesse Liberty, plus new podcasts from Hanselminutes, .NET Rocks!, and Coding QA.http://www.asp.net/learn/podcasts/ASP.NET NewsMon, 22 Feb 2010 05:00:00 GMT0
Get Popular Web Applications with the Windows Web App GalleryThe Windows Web App Gallery provides instant access to the most popular FREE web applications available today. With just a few clicks you can install any of the over 20 popular web applications such as CMS, blogs, wikis, e-commerce and more. Be up and running in just minutes. For more information or to browse the Application Gallery, please visit the Web Application Gallery page.http://www.microsoft.com/web/spotlight/appgallery.aspx?WT.mc_id=aff-web-corp-spotfeb_aspnetASP.NET NewsWed, 17 Feb 2010 08:00:00 GMT0
Microsoft ASP.NET: Create Dynamic Web ApplicationsAttend an upcoming live webcast or download the on-demand sessions and learn about the improvements in Microsoft ASP.NET 4. Hear about new controls and templating capabilities that enable rich Web development for applications using a variety of server-side technologies, new features of ASP.NET AJAX 4, and enhancements being made to server controls. Dive in and explore this content today.http://go.microsoft.com/?linkid=9707839ASP.NET NewsTue, 16 Feb 2010 05:00:00 GMT0
New Additions to the ASP.NET Control Gallery!Add GIS, multiple file uploading, image resizing, and additional capabilities to your web applications with the newest additions to the ASP.NET Control Gallery.http://www.asp.net/community/control-gallery/ASP.NET NewsFri, 12 Feb 2010 05:00:00 GMT0
ASP.NET 4 and Visual Studio 2010 Release Candidates Now Available!Download ASP.NET 4 RC and Visual Studio 2010 RC which are now available with "go-live" licenses that allow you to use them on production machines. To learn more about this release, read Scott Guthrie’s blog post.http://msdn.microsoft.com/en-us/vstudio/dd582936.aspxASP.NET NewsThu, 11 Feb 2010 05:00:00 GMT0
Download ASP.NET MVC 2 Release Candidate 2ASP.NET MVC is a free, fully supported framework that enables developers to quickly build standards-based, SEO-friendly Web sites by offering complete control over the HTML and URLs. Learn more about this release, and provide feedback to the team.http://go.microsoft.com/fwlink/?LinkID=182483ASP.NET NewsFri, 05 Feb 2010 05:00:00 GMT0
New Articles and Updates to the ASP.NET WikiExpand and share your knowledge about the AJAX Control Toolkit, ASP.NET Open Source Projects, Web Services, and more in the ASP.NET Wiki. Earn Community Recognition points by contributing!http://wiki.asp.net/ASP.NET NewsThu, 04 Feb 2010 05:00:00 GMT0
Search Engine Optimization (SEO) Just Got EasyStart with the free download, review your website, and make changes fast. The SEO Toolkit with its detailed analysis and search engine friendly suggestions helps improve the relevance of your website in search results right away. The SEO Toolkit will help you increase website traffic and revenue, influence and update search engines, and improve customer experience. For more information or to download, please visit the Free SEO Toolkit page.http://www.microsoft.com/web/spotlight/seo/?appid=10991012ASP.NET NewsMon, 01 Feb 2010 05:00:00 GMT0
Six New Upcoming Webcasts!Don't miss upcoming webcasts on ASP.NET Web Forms and AJAX 4! Register for an upcoming webcast to hear directly from the product team and industry experts on current and upcoming technologies, or watch the archived webcasts.http://www.asp.net/learn/webcasts/ASP.NET NewsFri, 29 Jan 2010 05:00:00 GMT0
Listen to New PodcastsWe’ve added more shows to the Podcasts page. Listen to hours of podcasts on issues of interest to all ASP.NET developers from .NET Rocks!, Hanselminutes, the Misfit Geek, and more. http://www.asp.net/learn/podcasts/ASP.NET NewsWed, 27 Jan 2010 05:00:00 GMT0
Learn about ASP.NET MVC 2 with Scott Guthrie's New Blog Series Scott Guthrie kicks off a new multi-part ASP.NET MVC 2 blog series and dives into new strongly types HTML helpers and enhanced model validation across both server and client.http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2.aspxASP.NET NewsFri, 22 Jan 2010 05:00:00 GMT0


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]