⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preview.aspx.cs

📁 如果不使用IIS,请先运行 XSP.exe,待提示已侦听 8080端口后
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Ader.TemplateEngine;

public partial class admin_Templet_PreView : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (! string.IsNullOrEmpty( Request.Form["content"]) )
        {
            string content= Request.Form["content"];

            if (Request["ans"] == "true")
            {
                TemplateManager tm = TemplateManager.FromString(content);
                IDictionary<string, object> databag = new Dictionary<string, object>();

                DNNLite.Entites.Modules.TempletPortalModuleBase.AddCommBag(ref databag);

                foreach (string key in databag.Keys)
                {
                    tm.SetValue(key, databag[key]);
                }
                Response.Write(tm.Process());
            }
            else
            {
                Response.Write(content);
            }
            Response.End();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -