System.IO.StreamReader(res.GetResponseStream()) 会报此流不支持查找操作 获取的网页出现乱码 10
代码如下:stringcontext="";HttpWebRequestreq=null;HttpWebResponseres=null;try{//http://job...
代码如下: string context = ""; HttpWebRequest req = null; HttpWebResponse res = null; try { //http://jobs.zhaopin.com/420619316250070.htm?ssidkey=y&ss=201&ff=03 req = (HttpWebRequest)HttpWebRequest.Create("http://jobs.zhaopin.com/420619316250070.htm?ssidkey=y&ss=201&ff=03"); res = (HttpWebResponse)req.GetResponse(); System.IO.StreamReader sr = new System.IO.StreamReader(res.GetResponseStream()); context = sr.ReadToEnd(); sr.Close(); txt1 = context; } catch { }
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询