Created
February 14, 2013 13:48
-
-
Save yetanotherchris/4952931 to your computer and use it in GitHub Desktop.
ASP.NET event lifecycle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = 1; | |
protected override void RecreateChildControls() | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("RecreateChildControls: {0}", count++)); | |
base.RecreateChildControls(); | |
} | |
protected override void OnInit(EventArgs e) | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("OnInit: {0}", count++)); | |
base.OnInit(e); | |
} | |
protected override void OnLoad(EventArgs e) | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("OnLoad: {0}", count++)); | |
base.OnLoad(e); | |
} | |
protected override void OnPreRender(EventArgs e) | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("OnPreRender: {0}", count++)); | |
base.OnPreRender(e); | |
} | |
public void ShowButton() | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("ShowButton: {0}", count++)); | |
} | |
protected override void OnUnload(EventArgs e) | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("OnUnload: {0}", count++)); | |
base.OnUnload(e); | |
} | |
protected override void Render(HtmlTextWriter writer) | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("Render: {0}", count++)); | |
base.Render(writer); | |
} | |
protected override object SaveControlState() | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("SaveControlState: {0}", count++)); | |
return base.SaveControlState(); | |
} | |
protected override void LoadViewState(object savedState) | |
{ | |
System.Diagnostics.Debug.WriteLine(string.Format("LoadViewState: {0}", count++)); | |
base.LoadViewState(savedState); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment