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.

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;

    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.