Getting the HTML source through the WebBrowser control in C#

前端 未结 5 666
一生所求
一生所求 2021-01-02 02:40

I tried to get HTML Source in the following way:

webBrowser1.Document.Body.OuterHtml;

but it does not work. For example, if the original HT

5条回答
  •  隐瞒了意图╮
    2021-01-02 03:06

    Have a look at this. WebBrowser on MSDN

    Alternative you could use Webclient.DownloadString from System.Net (it also has WebClient.DownloadStringAsync...) Here is the description: WebClient on MSDN

提交回复
热议问题