BlogEngine.Web/page.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

#region Using

using System;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
using System.Globalization;
using BlogEngine.Core;

#endregion

public partial class page : BlogEngine.Core.Web.Controls.BlogBasePage
{
	/// <summary>
	/// Handles the Load event of the Page control.
	/// </summary>
	/// <param name="sender">The source of the event.</param>
	/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
	protected void Page_Load(object sender, EventArgs e)
	{
		if (Request.QueryString["deletepage"] != null && Request.QueryString["deletepage"].Length == 36)
		{
			DeletePage(new Guid(Request.QueryString["deletepage"]));
		}

		if (Request.QueryString["id"] != null && Request.QueryString["id"].Length == 36)
		{
			ServePage(new Guid(Request.QueryString["id"]));
			AddMetaTags();
		}
		else
		{
			Response.Redirect(Utils.RelativeWebRoot);
		}
	}

	/// <summary>
	/// Serves the page to the containing DIV tag on the page.
	/// </summary>
	/// <param name="id">The id of the page to serve.</param>
	private void ServePage(Guid id)
	{
		this.Page = BlogEngine.Core.Page.GetPage(id);

		if (this.Page == null || (!this.Page.IsVisible))
			Response.Redirect(Utils.RelativeWebRoot + "error404.aspx", true);

		h1Title.InnerHtml = this.Page.Title;

		ServingEventArgs arg = new ServingEventArgs(this.Page.Content, ServingLocation.SinglePage);
		BlogEngine.Core.Page.OnServing(this.Page, arg);

		if (arg.Cancel)
			Response.Redirect("error404.aspx", true);

		if (arg.Body.ToLowerInvariant().Contains("[usercontrol"))
		{
后面还有 121 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。