日期:2014-05-18  浏览次数:20881 次

怎么通过代理浏览网页
string rl;
  WebRequest Request = WebRequest.Create("http://family.3g.qq.com/family/party/index.jsp?sid=");

  WebResponse Response = Request.GetResponse();


  Stream resStream = Response.GetResponseStream();

  StreamReader sr = new StreamReader(resStream, Encoding.UTF8);

  StringBuilder sb = new StringBuilder();

  while ((rl = sr.ReadLine()) != null)
  {
  sb.Append(rl);
  }



  string strhtml = sb.ToString();//抓取得到的源网页




  请问怎么利用代理访问到红色字体的网址,这个我没学过,求源代码修改,谢谢

------解决方案--------------------
WebRequest有Proxy属性,自己设置,看帮助