Xamarin: How to get HTML from page in WebView?
I develop Xamarin App for iOS and I am using WebView.
Just to get HTML of page, I use the following code.
WebClient wc = new WebClient();
using (Stream st = wc.OpenRead("http://study-csharp.blogspot.jp/")){
using (StreamReader sr = new StreamReader(st, Encoding.UTF8)){
string html = sr.ReadToEnd();
Console.Write(html);
}
}
However, I want HTML data after the user has logged in to the site in the webview.
I can't find the method to get HTML in UIWebView.
Thanks in advance.
You can just use javascript webView.EvaluateJavascript ("document.body.innerHTML")
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