How to display "No Rss feeds new availabe" when there are no FEEDS

Discussion in 'ASP .Net' started by Patrick Olurotimi Ige, May 4, 2005.

  1. I'm using the Function below to get XML feeds
    and calling the XML doc in

    But if they are no availabe rss feeds i would like to display
    "Sorry No Headlines/News at the moment"

    Any ideas


    page_load like:-

    myXml.Document = getXML("http://www.crn.com.au/rss.aspx?SCID=9")

    ---------------------------------
    Function getXML(ByVal sourceFile As String)
    Dim myRequest As System.Net.WebRequest =
    System.Net.WebRequest.Create(sourceFile)
    Dim myResponse As System.Net.WebResponse =
    myRequest.GetResponse()
    Dim myReader As System.Xml.XmlTextReader = New
    System.Xml.XmlTextReader(myResponse.GetResponseStream())
    Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument

    doc.Load(myReader)
    getXML = doc



    myResponse.Close()

    myReader.Close()

    End Function




    *** Sent via Developersdex http://www.developersdex.com ***
    Patrick Olurotimi Ige, May 4, 2005
    #1
    1. Advertising

  2. Patrick Olurotimi Ige

    clintonG Guest

    At the moment I would suggest researching the use of the AJAX
    methodology --- A(synchronous) JA(vascript) X(ml) --- which will allow you
    to refresh part of a page without a noticeable trip to the server (no page
    flash and no page refresh).

    <%= Clinton Gallagher
    METROmilwaukee (sm) "A Regional Information Service"
    NET csgallagher AT metromilwaukee.com
    URL http://metromilwaukee.com/
    URL http://clintongallagher.metromilwaukee.com/


    "Patrick Olurotimi Ige" <> wrote in message
    news:%...
    > I'm using the Function below to get XML feeds
    > and calling the XML doc in
    >
    > But if they are no availabe rss feeds i would like to display
    > "Sorry No Headlines/News at the moment"
    >
    > Any ideas
    >
    >
    > page_load like:-
    >
    > myXml.Document = getXML("http://www.crn.com.au/rss.aspx?SCID=9")
    >
    > ---------------------------------
    > Function getXML(ByVal sourceFile As String)
    > Dim myRequest As System.Net.WebRequest =
    > System.Net.WebRequest.Create(sourceFile)
    > Dim myResponse As System.Net.WebResponse =
    > myRequest.GetResponse()
    > Dim myReader As System.Xml.XmlTextReader = New
    > System.Xml.XmlTextReader(myResponse.GetResponseStream())
    > Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument
    >
    > doc.Load(myReader)
    > getXML = doc
    >
    >
    >
    > myResponse.Close()
    >
    > myReader.Close()
    >
    > End Function
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    clintonG, May 4, 2005
    #2
    1. Advertising

  3. Thanks ClntonG I had a look and it looks interesting alhtough i haven't
    tested it yet
    Patrick


    *** Sent via Developersdex http://www.developersdex.com ***
    Patrick Olurotimi Ige, May 5, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Imran Aziz
    Replies:
    4
    Views:
    1,501
    Imran Aziz
    Aug 11, 2005
  2. Marc Twain

    Display and display model

    Marc Twain, Jan 13, 2004, in forum: Java
    Replies:
    1
    Views:
    366
    Matt Humphrey
    Jan 13, 2004
  3. Jeff
    Replies:
    1
    Views:
    457
    Jacob
    Jul 13, 2006
  4. David D
    Replies:
    1
    Views:
    333
    Adrienne Boswell
    Feb 28, 2007
  5. rajkm42

    Display RSS feeds

    rajkm42, Mar 24, 2009, in forum: .NET
    Replies:
    0
    Views:
    330
    rajkm42
    Mar 24, 2009
Loading...

Share This Page