How to get html source code form WebView component in c#?
You can use the InvokeScript
or InvokeScriptAsync
methods. Do make sure the page is loaded first.
string html = await myWebView.InvokeScriptAsync("eval", new string[] { "document.documentElement.outerHTML;" });
var text = html;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With