How to: Request a Web Page and Retrieve the Results as a Stream

This example shows how to request a Web page and retrieve the results in a stream.

Dim myClient As WebClient = New WebClient()
Dim response As Stream = myClient.OpenRead("http://www.contoso.com/index.htm")
' The stream data is used here.
response.Close()

This example requires:

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft