📄 label.cs
字号:
using System;
namespace System.Web.UI.WebControls
{
/// <summary>
/// Summary description for Label.
/// </summary>
//.custom instance void System.Web.UI.ParseChildrenAttribute
//.custom instance void System.Web.UI.ControlBuilderAttribute
//.custom instance void System.Web.UI.DataBindingHandlerAttribute
//.custom instance void [System]System.ComponentModel.DefaultPropertyAttribute
//.custom instance void [System]System.ComponentModel.DesignerAttribute
public class Label : WebControl
{
public Label() : base()
{
}
internal Label(HtmlTextWriterTag tag) : base(tag)
{
}
protected virtual void AddParsedSubObject(object obj)
{
string local0;
if (this.HasControls())
{
this.AddParsedSubObject(obj);
return;
}
if (obj as LiteralControl != null)
{
this.Text = ((LiteralControl) obj).Text;
return;
}
local0 = this.Text;
if (local0.Length != 0)
{
this.Text = System.String.Empty;
this.AddParsedSubObject(new LiteralControl(local0));
}
this.AddParsedSubObject(obj);
}
protected virtual void LoadViewState(object savedState)
{
string local0;
if (savedState != null)
{
this.LoadViewState(savedState);
local0 = (String) this.ViewState["Text"];
if (local0 != null)
this.Text = local0;
}
}
protected virtual void RenderContents(HtmlTextWriter writer)
{
if (this.HasControls())
{
this.RenderContents(writer);
return;
}
writer.Write(this.Text);
}
public virtual string Text
{
get
{
object local0;
local0 = this.ViewState["Text"];
if (local0 != null)
return (String) local0;
return System.String.Empty;
}
set
{
if (this.HasControls())
this.Controls.Clear();
this.ViewState["Text"]= value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -