title: How to get rendered html (processed by Javascript) in WebBrowser control?
body: <p>I have an <code>ASP.NET</code> page and some custom class that fetches a specified webpage and returns that page body back.</p>
  <pre class="lang-cs prettyprint-override"><code>protected String GetHtml()
  {
      Thread thread = new Thread(new ThreadStart(GetHtmlWorker));
      thread.SetApartmentState(ApartmentState.STA);
      thread.Start();
      thread.Join();
      return docHtml;
  }
  
  protected void GetHtmlWorker()
  {
      using (WebBrowser browser = new WebBrowser())
      {
          browser.ScriptErrorsSuppressed = true;
          browser.Navigate(_url);
          // Wait for control to load page
          while (browser.ReadyState != WebBrowserReadyState.Complete)
              Application.DoEvents();
          docHtml = browser.DocumentText;
      }
  }
  </code></pre>
  <p>But what I need is to get <code>DOM HTML</code> instead of the page source because I do some extra operations over <code>DOM</code> by <code>jQuery</code>.</p>