展开全部
using System.Net;
HttpWebRequest hwr = (HttpWebRequest)HttpWebRequest.Create("http://www.baidu.com");
string html = "";
using (StreamReader sr = new StreamReader(hwr.GetResponse().GetResponseStream()))
{
html = sr.ReadToEnd();
}
MessageBox.Show(html);
HttpWebRequest hwr = (HttpWebRequest)HttpWebRequest.Create("http://www.baidu.com");
string html = "";
using (StreamReader sr = new StreamReader(hwr.GetResponse().GetResponseStream()))
{
html = sr.ReadToEnd();
}
MessageBox.Show(html);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询