OnInit
TrackViewState
OnLoad
EnsureChildControls
CreateChildControls
OnPreRender
SaveViewState
Render
RenderChildren
OnUnload
试验程序:
using System;
using System.Data;
using System.Data.OleDb;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.UI;
using System.IO;
using System.ComponentModel;
namespace ku1
{
/// <summary>
/// te 的摘要说明。
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:te runat=server></{0}:te>")]
public class te : System.Web.UI.WebControls.WebControl,INamingContainer
{
private string text;
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
/// <summary>
/// 将此控件呈现给指定的输出参数。
/// </summary>
/// <param name="output"> 要写出到的 HTML 编写器 </param>
protected override void CreateChildControls()
{
HttpContext.Current.Response.Write("CreateChildControls<br>");
base.CreateChildControls();
}
public override void DataBind()
{
HttpContext.Current.Response.Write("DataBind()<br>");
base.DataBind() ;
}
protected override void AddParsedSubObject(object obj)
{
HttpContext.Current.Response.Write("AddParsedSubObject<br>");
base.AddParsedSubObject(obj);
}
protected override ControlCollection CreateControlCollection()
{
HttpContext.Current.Response.Write("CreateControlCollection<br>");
return base.CreateControlCollection();
}
protected override void EnsureChildControls()
{
HttpContext.Current.Response.Write("EnsureChildControls<br>");
base.EnsureChildControls();
}
public override bool HasControls()
{
HttpContext.Current.Response.Write("HasControls<br>");
return base.HasControls();
}
protected override void LoadViewState(object savedState)
{
HttpContext.Current.Response.Write("LoadViewState<br>");
base.LoadViewState(savedState);
}
protected override bool OnBubbleEvent(object source, EventArgs args)
{
HttpContext.Current.Response.Write("OnBubbleEvent<br>");
return base.OnBubbleEvent(source,args);
}
protected override void OnDataBinding(EventArgs e)
{
HttpContext.Current.Response.Write("OnDataBinding<br>");
base.OnDataBinding(e);
}
protected override void OnInit(EventArgs e)
{
HttpContext.Current.Response.Write("OnInit<br>");
base.OnInit(e);
}
protected override void OnLoad(EventArgs e)
{
HttpContext.Current.Response.Write("OnLoad<br>");
base.OnLoad(e);
}
protected override void OnPreRender(EventArgs e)
{
HttpContext.Current.Response.Write("OnPreRender<br>");
base.OnPreRender(e);
}
protected override void OnUnload(EventArgs e)
{
HttpContext.Current.Response.Write("OnUnload<br>");
base.OnUnload(e);
}
protected override void RemovedControl(Control control)
{
HttpContext.Current.Response.Write("RemovedControl<br>");
base.RemovedControl(control);
}
protected override void Render(HtmlTextWriter writer)
{
HttpContext.Current.Response.Write("Render<br>");
base.Render(writer);
}
protected override void RenderChildren(HtmlTextWriter writer)
{
HttpContext.Current.Response.Write("RenderChildren<br>");
base.RenderChildren(writer);
}
protected override object SaveViewState()
{
HttpContext.Current.Response.Write("SaveViewState<br>");
return base.SaveViewState();
}
protected override void TrackViewState()
{
HttpContext.Current.Response.Write("TrackViewState<br>");
base.TrackViewState();
}
}
}