0

Hi,

Using c-sharp 2008.

I've created a browser from the example I've found on the net, and it's working fine.

Now I want to split the screen in 2 one with the webrowser content and one with the richText content.

I want to see the source(text) of the HTML that is render here what I've tried:

    private void button1_Click(object sender, EventArgs e)
    {

        urlBox.Text = "google.com";
        webBrowser.Navigate(urlBox.Text);
        //String aStr = webBrowser.DocumentText(urlBox.Text);
        //String aStr =webBrowser.Navigate(urlBox.Text);
        richTextBox.Text = webBrowser.ToString();
    }

How do I populate the richtextBox.Text with the source of the HTML.

New to C your guidance will be appreciated.

Edited by Nick Evan: Fixed formatting

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by myC_michel
0

I just needed to define a String and pass it.

Here the code. If anybody needs it?

   private void button1_Click(object sender, EventArgs e)
    {

        webBrowser.Navigate(urlBox.Text);

        String document = this.webBrowser.DocumentText;
        richTextBox.Text = document;

    }

Edited by Nick Evan: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.