简体   繁体   中英

Browse Secure Web pages in wpf web browser control

In my another application, I am using wpf+C#. I used a Web browser control available. Now I need to load a secure page like gmail inbox in that browser. Or atleast i need the html markup of the page. Can anyone help. Thank you.

Try this (updated):

WebClient client = new WebClient();
byte[] dataBuffer = client.DownloadData("https://www.gmail.com");
string data = Encoding.ASCII.GetString(dataBuffer);
webBrowser.NavigateToString(data);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM