Access a Internet URL from my web application

Discussion in 'ASP .Net' started by Techeek, Jan 6, 2008.

  1. Techeek

    Techeek Guest

    How to access a Internet URL from a web application ? This web request will
    give
    XML output. How can I read that output??

    Can anyone help me??
    --
    techeek
    http://oxyin.com/techeek/
     
    Techeek, Jan 6, 2008
    #1
    1. Advertisements

  2. "Techeek" <> wrote in message
    news:...

    > How to access a Internet URL from a web application ? This web request
    > will
    > give XML output. How can I read that output??


    string strXML = String.Empty;
    using (WebClient objWebClient = new WebClient())
    {
    using (StreamReader objStreamReader = new
    StreamReader(objWebClient.OpenRead("https://www.website.com/xmlpage.aspx")))
    {
    strXML = objStreamReader.ReadToEnd();
    objStreamReader.Close();
    }
    }


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Jan 6, 2008
    #2
    1. Advertisements

  3. Peter Bromberg [C# MVP], Jan 7, 2008
    #3
    1. Advertisements

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. Sean
    Replies:
    2
    Views:
    607
  2. Simon Jefferies
    Replies:
    0
    Views:
    436
    Simon Jefferies
    Apr 6, 2004
  3. Simon Jefferies
    Replies:
    0
    Views:
    427
    Simon Jefferies
    Apr 9, 2004
  4. Steven Cheng[MSFT]

    RE: Web application causes Web Access Failed message

    Steven Cheng[MSFT], Apr 13, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    781
    Steven Cheng[MSFT]
    Apr 15, 2004
  5. Jon paugh
    Replies:
    1
    Views:
    1,334
  6. abcd
    Replies:
    7
    Views:
    493
    Alexey Smirnov
    Aug 19, 2009
  7. Just D.
    Replies:
    0
    Views:
    801
    Just D.
    Aug 11, 2004
  8. SMS
    Replies:
    1
    Views:
    358
    Anthony Jones
    Oct 3, 2006
Loading...