- string weacherhtml = String.Empty;
- HttpWebRequest webrt = (HttpWebRequest)WebRequest.Create("http://www.sohu.com");
- HttpWebRequest webrs = (HttpWebRequest)webrt.GetResponse();
- Stream stream = webrs.GetResponseStream();
- StreamReader srm = new StreamReader(stream,System.Text.Encoding.Default);
- weacherhtml = srm.ReadToEnd();
获取网站中其他网页的内容(摘抄自《精通ASP.Net 2.0企业级项目开发》)
最新推荐文章于 2024-11-08 23:27:36 发布