using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Net; // 提供webClient
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
WebClient wc=new WebClient();
Stream s= wc.OpenRead("
http://localhost/index.htm");
StreamReader sr = new StreamReader(s);
string str1 = sr.ReadToEnd();
Response.Write(str1);//输出网页
}
}
转载于:https://www.cnblogs.com/sosoli/archive/2006/10/17/531089.html