visual-studio-2008capturetext-capture

Get the text from a web page


How do I capture the text from the web page? Do I need to get the page source and how?


Solution

  • The WebClient object has a method available to do this for you:

    WebClient client = new WebClient();
    string html = client.DownloadString("http://www.google.com");