title: Source code WebBrowser
body: <p>I want to know how to find the source code of the website I went to in my program using WebBrowser. I have this code but it opens up a new window and I want the text to go in the richtextbox.</p>
  
  <pre><code>    Form sourceForm = new Form();
      TextBox sourceCode = new TextBox();
      sourceCode.Dock = DockStyle.Fill;
      sourceCode.Multiline = true;
      sourceCode.ScrollBars = ScrollBars.Both;
      sourceForm.Width = 700;
      sourceForm.Height = 500;
      sourceForm.StartPosition = FormStartPosition.CenterScreen;
      sourceForm.ShowIcon = false;
      sourceForm.ShowInTaskbar = false;
      sourceForm.Text = "Source Code for " + WebBrowser.Url;
      sourceCode.Text = WebBrowser.DocumentText;
      sourceForm.Controls.Add(sourceCode);
      sourceForm.Show(this);
      sourceCode.ReadOnly = true;
  </code></pre>