String url= "http://www.google.com.hk/search?hl=zh-CN&q=孟宪会" ;
System.Net.HttpWebRequest r = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(url);
r.AllowAutoRedirect = true ;
//System.Net.CookieContainer c = new System.Net.CookieContainer();
//r.CookieContainer = c;
System.Net.HttpWebResponse res = r.GetResponse() as System.Net.HttpWebResponse;
System.IO.StreamReader s = new System.IO.StreamReader(res.GetResponseStream(),System.Text.Encoding.GetEncoding( "GB2312" ));
Response.Write(s.ReadToEnd());
res.Close();
|