Related Posts with Thumbnails

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.
  • 0 comments:

    Post a Comment

    Site Rate