html code for browser control code example
Example 1: c# webbrowser write html to text file
WebBrowser wb = new WebBrowser();
wb.DocumentCompleted +=
new WebBrowserDocumentCompletedEventHandler(DisplayText);
wb.Url = urlPath;
Example 2: c# webbrowser write html to text file
private void DisplayText(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser wb = (WebBrowser)sender;
wb.Document.ExecCommand("SelectAll", false, null);
wb.Document.ExecCommand("Copy", false, null);
textResultsBox.Text = CleanText(Clipboard.GetText());
}