Created
March 1, 2011 01:54
-
-
Save robertgreiner/848459 to your computer and use it in GitHub Desktop.
An example of the different lifecycle events an ASP .NET page goes through
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
namespace LifeCycleEvents { | |
public partial class Default : System.Web.UI.Page { | |
protected void Page_PreInit(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_PreInit"); | |
} | |
protected void Page_Init(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_Init"); | |
} | |
protected void Page_InitComplete(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_InitComplete"); | |
} | |
protected void Page_PreLoad(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_PreLoad"); | |
} | |
protected void Page_Load(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_Load"); | |
} | |
protected void Page_LoadComplete(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_LoadComplete"); | |
} | |
protected void Page_PreRender(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_PreRender"); | |
} | |
protected void Page_SaveStateComplete(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_SaveStateComplete"); | |
} | |
protected void Page_Unload(object sender, EventArgs e) { | |
System.Diagnostics.Debug.WriteLine("Page_Unload"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment