How to get rendered html (processed by Javascript) in WebBrowser control?

前端 未结 5 496
深忆病人
深忆病人 2020-11-27 06:50

I have an ASP.NET page and some custom class that fetch specified webpage, and returns this page body.

protected String GetHtml()
{
          Thread thread =         


        
5条回答
  •  遥遥无期
    2020-11-27 07:30

    As George said in one of the comments, in theory you can just get the DOM in webBrowser1_DocumentCompleted by just using:

    webBrowser1.Document.GetElementsByTagName("HTML")[0].OuterHtml;
    

提交回复
热议问题