📄 htmlpage.cs
字号:
namespace ASPNET.StarterKit.Communities.HtmlPage {
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web;
using ASPNET.StarterKit.Communities;
//*********************************************************************
//
// HtmlPage Class
//
// Represents an HTML page.
//
//*********************************************************************
public class HtmlPage : SkinnedCommunityControl {
string _skinFileName = "HtmlPage_HtmlPage.ascx";
Literal ltlHtml;
//*********************************************************************
//
// HtmlPage Constructor
//
// Calls the base SkinnedCommunityControl constructor
// and assigns the default page skin.
//
//*********************************************************************
public HtmlPage() : base() {
// Assign a default skin file name
if (SkinFileName == null)
SkinFileName = _skinFileName;
}
//*********************************************************************
//
// SkinType Property
//
// Specifies the skins directory where this page's skin file is located.
//
//*********************************************************************
override protected string SkinType {
get { return "ContentSkins"; }
}
//*********************************************************************
//
// InitializeSkin Method
//
// Retrieves all the controls from the Page Skin
//
//*********************************************************************
override protected void InitializeSkin(Control skin) {
// Find HTML Literal
ltlHtml = (Literal)GetControl(skin, "ltlHtml");
ltlHtml.EnableViewState = false;
}
//*********************************************************************
//
// OnLoad Method
//
// Retrieves HTML page from HtmlPageUtility component
// and displays the page.
//
//*********************************************************************
override protected void OnLoad(EventArgs e) {
if (!Page.IsPostBack) {
EnsureChildControls();
ltlHtml.Text = HtmlPageUtility.GetHtmlPage(objSectionInfo.ID);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -