I have a Form with a WebBrowser, two text boxes (1 and 2) and a button. In the text box 1 I enter a URL, press the button and execute:
private void button1_Click(object sender, EventArgs e)
{
Uri myUri = new Uri(textBox1.Text);
webBrowser1.Url = myUri;
webBrowser1.Navigate(myUri);
}
The WebBrowser shows me the web page. Up there, right.
I want to take the HTML of the page and show it in TextBox2
and for that I do:
private void webBrowser1_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
textBox2.Text = webBrowser1.DocumentText;
}
But he does not show me anything. Can you help me?