📄 wap.cs
字号:
namespace PowerEasy.WebSite
{
using PowerEasy.Common;
using PowerEasy.Components;
using PowerEasy.Model.TemplateProc;
using PowerEasy.Templates;
using PowerEasy.Web.UI;
using System;
using System.Globalization;
using System.Text;
using System.Web;
public class Wap : DynamicPage
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
protected void Page_PreRender(object sender, EventArgs e)
{
base.Response.Clear();
base.Response.Buffer = true;
base.Response.Charset = "utf-8";
base.Response.AddHeader("contenttype", "text/vnd.wap.wml; charset=utf-8");
base.Response.ContentEncoding = Encoding.GetEncoding("utf-8");
base.Response.ContentType = "text/vnd.wap.wml; charset=utf-8";
TemplateInfo templateInfo = new TemplateInfo();
templateInfo.QueryList = base.Request.QueryString;
templateInfo.PageName = DynamicPage.RebuildPageName(base.Request.Url.LocalPath, base.Request.QueryString);
string path = "/其他模板/默认wap页模板.html";
foreach (FrontTemplate template in SiteConfig.FrontTemplateList)
{
if (string.Compare(this.PageFileName, template.Key, true, CultureInfo.CurrentCulture) == 0)
{
path = template.Value;
break;
}
}
templateInfo.TemplateContent = Template.GetTemplateContent(path);
templateInfo.RootPath = HttpContext.Current.Request.PhysicalApplicationPath;
templateInfo.CurrentPage = DataConverter.CLng(base.Request.QueryString["page"], 1);
templateInfo = TemplateTransform.GetHtml(templateInfo);
base.Response.Write(templateInfo.TemplateContent);
base.Response.End();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -