我在网上找的一个办法是
StreamReader sr = new StreamReader(web.DocumentStream, System.Text.Encoding.GetEncoding("gb2312"));
String html = sr.ReadToEnd();
还有没有其他的~~
或者是告诉我一种代码转换的方法~~谢谢了
StreamReader sr = new StreamReader(web.DocumentStream, System.Text.Encoding.GetEncoding("gb2312"));
String html = sr.ReadToEnd();
还有没有其他的~~
或者是告诉我一种代码转换的方法~~谢谢了
{
if (web.DocumentText.IndexOf("Internet Explorer 无法显示该网页") < 0 && web.DocumentText.IndexOf("<title>没有可以显示的页面 </title>")<0)
{
MessageBox.Show("无法显示该网页");
}
}