111,129
社区成员
发帖
与我相关
我的任务
分享httpReq.CachePolicy = New System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore) '不读缓存,从网上找的,不知道好使不好使。Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache"); WebRequest wreq = WebRequest.Create("http://.....html");
WebResponse wres = wreq.GetResponse();
Stream s = wres.GetResponseStream();
StreamReader sr = new StreamReader(s, Encoding.GetEncoding("gb2312"));
string htmlstr = sr.ReadToEnd();
sr.Close();
s.Close();
wres.Close();