List of Exercises

Download and Read Html by URL in WinForms c#

	    
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Html_from_URL
{
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private void read_url_Click(object sender, EventArgs e)
    {
      string htmlCode;
      using (System.Net.WebClient client = new System.Net.WebClient())
      {
        htmlCode = client.DownloadString(url.Text);
      }
      webBrowser1.ScriptErrorsSuppressed = true;
      webBrowser1.DocumentText = htmlCode;
      richTextBox1.Text = htmlCode;
    }
  }
}
		
	 


Download the project of Visual Studio 2013 in DropBox Download


How to Download and Read Html Code from URL | Parse Html in C#


Video Thumbnail