Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. RSS Files????Please help

RSS Files????Please help

Scheduled Pinned Locked Moved ASP.NET
tutorialquestionhelpannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DarynRoberts
    wrote on last edited by
    #1

    Hey all. Im struggling to understand and get this to work. Can anyone tell me step by step how to use an RSS feed to display news headlines in my Website. I have no clue how this works....? Do i create the RSS feed? Do I download it? How do i use it? Please help

    Dazz

    F 1 Reply Last reply
    0
    • D DarynRoberts

      Hey all. Im struggling to understand and get this to work. Can anyone tell me step by step how to use an RSS feed to display news headlines in my Website. I have no clue how this works....? Do i create the RSS feed? Do I download it? How do i use it? Please help

      Dazz

      F Offline
      F Offline
      Fred_Smith
      wrote on last edited by
      #2

      There are lots of articles and tutorials out there on how to consume RSS feeds - even some here on CP. Search the articles and Google for "RSS consume web page"... no-one's going to write a whole tutorial just for you here... Do some basic research, then, if you have a specific question...

      D 1 Reply Last reply
      0
      • F Fred_Smith

        There are lots of articles and tutorials out there on how to consume RSS feeds - even some here on CP. Search the articles and Google for "RSS consume web page"... no-one's going to write a whole tutorial just for you here... Do some basic research, then, if you have a specific question...

        D Offline
        D Offline
        DarynRoberts
        wrote on last edited by
        #3

        The reason why i worded my query the way i did is because I have already done 6 tutorials off the web and none of them worked. So i posted a comment in order to hopefully find someone who has used them before.I dont want anyone to write a tutorial for me... But thanks anyway for your brilliant suggestion.

        Dazz

        F 1 Reply Last reply
        0
        • D DarynRoberts

          The reason why i worded my query the way i did is because I have already done 6 tutorials off the web and none of them worked. So i posted a comment in order to hopefully find someone who has used them before.I dont want anyone to write a tutorial for me... But thanks anyway for your brilliant suggestion.

          Dazz

          F Offline
          F Offline
          Fred_Smith
          wrote on last edited by
          #4

          Well, honestly, I have never done this (consuming RSS feeds) before, but it took me all of 10 minutes to follow this example http://aspnet.4guysfromrolla.com/articles/031903-1.aspx and get it working. All I would say is, that you have to a) find out the URL of the RSS feed you want to xonsume - and most websites that have one will display it, or else search for it on Google; and b) you will probably have to examine the XML returned to ge the appropriate field names. You should also probably server.htmlencode the description field at least. Here is my code for my working example: (Click thr button) I'm afraid I'm out for thr day now, so you're on your own after this.... Fred <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Xml" %> Sub Page_Load(sender as Object, e as EventArgs) End Sub Sub btn_Click(ByVal sender As Object, ByVal e As EventArgs) recentPosts.DataSource = GetRSSFeed("http://www.weathercommerce.net/rss4.xml") 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("item") End Function

          ["> <%# DataBinder.Eval(Container.DataItem, "title") %>](<%# DataBinder.Eval(Container.DataItem, )
          <%#DataBinder.Eval(Container.DataItem, "description")%>

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups