Using RSS Feeds

Posted on 2008-11-09
Last Modified: 2012-05-05
I'm trying to use an rss feed on my website but can't get it to work. Here is the code behind the webpage:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        rssPosts.DataSource = GetRSSFeed("")
    End Sub

    Protected Function GetRSSFeed(ByVal 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()
        Return ds.Tables(2)
    End Function

The result when I run this is an error: A column named 'category' already belongs to this DataTable: cannot set a nested table name to the same name.

I've tried many different rss feeds and all give the same result.

Any help would be greatly appreciated.
Question by:stullhe104
    LVL 29

    Expert Comment

    by:David H.H.Lee
    Hi stullhe104,
    Perhaps you can use online Feed Validator to check the existing RSS file:

    Accepted Solution

    Thanks for the post. It does show that the rss feed is valid but that didn't help solve my problem.

    I solved the problem by using RSSToolKit which I found at:

    LVL 29

    Expert Comment

    by:David H.H.Lee
    Hi stullhe104,
    Ok, you may request admin to refund the points since you already found your own solution.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now