public string GetHtmlString(string url)
{
WebRequest wr = WebRequest.CreateHttp(url);
WebResponse res = wr.GetResponse();
Stream st = res.GetResponseStream();
StreamReader sr = new StreamReader(st, Encoding.UTF8);
string GetHtml = sr.ReadToEnd();
st.Close();
sr.Close();
return GetHtml;
}
你的意思是获取页面html部分的内容吧