WebRequest req = WebRequest.Create("http://www.88te.com");
try
{
WebResponse result = req.GetResponse();
//得到的流是网页内容
Stream ReceiveStream = result.GetResponseStream();
StreamReader readerOfStream = new StreamReader(ReceiveStream,
System.Text.Encoding.GetEncoding("GB2312"));
string aa= readerOfStream.ReadToEnd();
Response.Write(aa);
ReceiveStream.Close();
}
catch(Exception)
{
……
}