Accessing Webpages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jennifer

    Accessing Webpages

    Hi

    How can I download a webpage into a String? It's actually an online xml doc that I want to store in a DataSet, any ideas

    Jennifer.
  • John Timney \(Microsoft MVP\)

    #2
    Re: Accessing Webpages

    webpages are returned as the results of a get, post or put request. So you
    need to make a request to get the server to return the results of your call.


    frlrfsystemnetw ebrequestclasst opic.asp

    --
    Regards

    John Timney
    Microsoft Regional Director
    Microsoft MVP


    "Jennifer" <anonymous@disc ussions.microso ft.com> wrote in message
    news:37F1AF4F-8A20-476A-B495-31E634365B46@mi crosoft.com...[color=blue]
    > Hi,
    >
    > How can I download a webpage into a String? It's actually an online xml[/color]
    doc that I want to store in a DataSet, any ideas?[color=blue]
    >
    > Jennifer.[/color]


    Comment

    • N.K

      #3
      Re: Accessing Webpages

      Use System.Net.WebC lient to read the data

      Code should look somewhat like ...

      WebClient myWebClient = new WebClient();
      Stream myStream = myWebClient.Ope nRead(uriString );
      DataSet ds = new DataSet();
      ds.ReadXml(mySt ream);

      Cheers
      Nirmal


      "Jennifer" <anonymous@disc ussions.microso ft.com> wrote in message news:<37F1AF4F-8A20-476A-B495-31E634365B46@mi crosoft.com>...[color=blue]
      > Hi,
      >
      > How can I download a webpage into a String? It's actually an online xml doc that I want to store in a DataSet, any ideas?
      >
      > Jennifer.[/color]

      Comment

      Working...