How to Request a Web Page and Retrieve the Results as a StreamWe can request a web page and retieve it as a stream using System.Net.WebClient class OpenRead()method this method returns a stream object we can use this stream in our code for further processingas given below:using System.IO;using System.Net;WebClient myClient = new WebClient();
Stream objresponse = myClient.OpenRead("http://www.website.com/index.htm"); // The stream data is used here. response.Close();
No comments:
Post a Comment