Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin: How to get HTML from page in WebView? [closed]

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.

like image 913
lp6m Avatar asked Jun 14 '15 04:06

lp6m


1 Answers

You can just use javascript webView.EvaluateJavascript ("document.body.innerHTML")

like image 179
Artur Shamsutdinov Avatar answered Nov 06 '22 05:11

Artur Shamsutdinov