asp.net如何实现提取网页中的局部信息功能.

static string GetPageSource(string strURL)
{
Uri uri =new Uri(strURL);
HttpWebRequest Req = (HttpWebRequest)WebRequest.Create(uri);
HttpWebResponse Res = (HttpWebResponse)Req.GetResponse();
Req.Method = "Get";
Req.KeepAlive = false;
StreamReader str = new StreamReader(Res.GetResponseStream(),System.Text.Encoding.GetEncoding("GB2312"));
return str.ReadToEnd();
}
[此贴子已经被作者于2006-8-4 16:46:17编辑过]