导航

在当前页面显示另一页面内容

Posted on 2012-04-26 17:41  yjss  阅读(316)  评论(0编辑  收藏  举报
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Clear();
            var webClient = new System.Net.WebClient() { Encoding = System.Text.Encoding.UTF8 };
            Response.Write(webClient.DownloadString("http://www.baidu.com/"));
            Response.End();

            //Response.Clear();
            //System.IO.TextReader strreader;
            //strreader = new System.IO.StreamReader(System.Net.HttpWebRequest.Create("http://www.baidu.com/").GetResponse().GetResponseStream(), System.Text.Encoding.UTF8);
            //Response.Write(strreader.ReadToEnd());
            //Response.End();
        }