/// <summary>
/// PageBase 页面基类
/// </summary>
public class PageBase : System.Web.UI.Page
{
protected override void Render(HtmlTextWriter writer)
{
StringWriter sw = new StringWriter();
HtmlTextWriter htmlWriter = new HtmlTextWriter(sw);
base.Render(htmlWriter);
string html = sw.ToString();
html = Regex.Replace(html, "[\f\n\r\t\v]", "");
html = Regex.Replace(html, " {2,}", " ");
html = Regex.Replace(html, ">[ ]{1}", ">");
writer.Write(html);
}
}
public partial class WebForm : System.Web.UI.Page
改
public partial class WebForm : PageBase