ASPX页面生成HTML的方法

System.IO.StringWriter html = new System.IO.StringWriter();
 System.Web.UI.HtmlTextWriter tw = new System.Web.UI.HtmlTextWriter(html);
 Server.Execute("~/My.aspx", tw);
String strHTML = html.ToString();

你可能感兴趣的:(html)