WebRequest & WebResponse


  
   Uri myUri =new Uri("http://211.154.170.249:9002/xxx.aspx?para1=x&para2=y)

   WebRequest wrq = WebRequest.Create(myUri);
   WebResponse wrs = wrq.GetResponse();  

   Stream strm = wrs.GetResponseStream();
   StreamReader sr = new StreamReader(strm, System.Text.Encoding.GetEncoding( "gb2312" ));     
   
   //读取网页
   string allHtml = sr.ReadToEnd();

你可能感兴趣的:(response)