?? sectiontitle.cs
字號:
namespace ASPNET.StarterKit.Communities {
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
//*********************************************************************
//
// SectionTitle Class
//
// Represents a section title
//
//*********************************************************************
[Designer(typeof(ASPNET.StarterKit.Communities.CommunityDesigner))]
public class SectionTitle : WebControl {
string _text = String.Empty;
//*********************************************************************
//
// SectionTitle Constructor
//
// Get the title from the PageInfo object
//
//********************************************************************
public SectionTitle() : base() {
// assign default css class
CssClass = "SectionTitle";
// Get SectionInfo object
if (Context != null) {
SectionInfo objSectionInfo = (SectionInfo)Context.Items["SectionInfo"];
_text = objSectionInfo.Title;
}
}
//*********************************************************************
//
// Text Property
//
// Allows the text to be assigned
// This property is used in previewing on the add or edit page
//
//********************************************************************
public string Text {
get {return _text; }
set {_text = value; }
}
//*********************************************************************
//
// RenderContents Method
//
// Display title. Notice that we are NOT HTML Encoding
//
//*********************************************************************
override protected void RenderContents(HtmlTextWriter writer) {
// Write title
writer.Write(_text);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -