摘要: 最近升级了一个C/S程序,升级后mshtml没有办法升级,后来看到.net2.0中有WebBrowser控件,但取DocumentText属性获取的页面内容时出现了乱码。通过查找网上资料,试了一下使用以下的方式可以实现需要的内容。 System.IO.StreamReader sr = new System.IO.StreamReader(this.webBrowser1.DocumentStream, System.Text.Encoding.GetEncoding(this.webBrowser1.Document.Encoding)); string sHtml = sr.ReadToEnd(); 阅读全文
posted @ 2007-09-29 15:52 小草 阅读(1213) 评论(2) 推荐(0) 编辑
Google+