void Page_Load()
{
string rl;
WebRequest myReq=WebRequest.Create(http://www.baidu.com);
WebResponse myRes=myReq.GetResponse();
Stream resStream=myRes.GetResponseStream();
StreamReader sr=new StreamReader(resStream,Encoding.Default);
StringBuilder sb=new StringBuilder();
while((rl=sr.ReadLine())!=null)
{
sb.Append(rl);
}
result.Text=sb.ToString();
myRes.Close();
}
怎么把这一段web程序改为winform程序,菜鸟求助?