Related Posts with Thumbnails
Showing posts with label System.Net.WebRequest(). Show all posts
Showing posts with label System.Net.WebRequest(). Show all posts

C# sample for retrieving html content from any websites

Monday, May 3, 2010

This chapter will teach you how to retrieve content of any website using .NET classes.

This chapter and the attached sample application demonstrates the usage of following .NET classes and methods:


  • System.Net.WebRequest() - Class to perform the web related operations.




  • System.Net.WebRequest.Create(url) - Create a web request.




  • System.Net.WebRequest.GetResponse() - Get the html content of the URL.




  • System.IO.StreamReader - Read from file.
  • Site Rate