using System;
using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page
{ protected void Page_Load(object sender, EventArgs e) { string html =Get_Html(HttpContext.Current.Server.MapPath(@"~/") + "index.html"); Response.Write(html); } /// <summary> /// 根据链接地址 获取 Html文本 /// </summary> public static string Get_Html(string Url) { System.Net.WebClient wc = new System.Net.WebClient(); try { Byte[] pageData = wc.DownloadData(Url); wc.Credentials = System.Net.CredentialCache.DefaultCredentials; wc.Dispose(); return System.Text.Encoding.Default.GetString(pageData); } catch (Exception ex) { } finally { } return ""; }}