/// <summary> /// 显示400页面 /// </summary> /// <returns></returns> public void RenderNotfound(string message, TemplatePageHandler handler) { Response.StatusCode = 404; string html = null; try { TemplatePage tpl = new TemplatePage(String.Format("/{0}/notfound", this.CurrentSite.Tpl)); if (handler != null) { handler(tpl); } tpl.Render(); return; } catch { html = "File not found!"; } Response.Write(html); }
/// <summary> /// 显示400页面 /// </summary> /// <returns></returns> public void RenderNotfound(string message, TemplatePageHandler handler) { Response.StatusCode = 404; string html = null; try { TemplatePage tpl = new TemplatePage(String.Format("/{0}/notfound", this.CurrentSite.Tpl)); if (handler != null) { handler(tpl); } tpl.Render(); return; } catch { html = "File not found!"; } Response.Write(html); }