I'm looking to get a more thorough understanding of the ASP.NET page lifecycle. I'm in the process of building custom form controls and have found my knowledge in this area to be lacking.
5 Answers
I have this on my tack board. Helpful when your using Master pages.
- Content page PreInit event
- Master page controls Init event
- Content controls Init event
- Master page Init event
- Content page Init event
- Content page Load event
- Master page Load event
- Master page controls Load event
- Content page controls Load event
- Content page PreRender event
- Master page PreRender event
- Master page controls PreRender event
- Content page controls PreRender event
- Master page controls Unload event
- Content page controls Unload event
- Master page Unload event
- Content page Unload event
I've found this chart to be fairly useful. Provides a brief description as to what the piece is doing... John-Sheehan ASP.NET Life Cycle Events
This is the "original" MSDN overview. Pretty good:
http://msdn.microsoft.com/en-us/library/ms227435.aspx
Honestly, you shouldn't need our help to find these things. Try Google.
-
1I agree Tor, google can answer this question well. However, having all this information in a single location is also very beneficial for all involved. Mar 2, 2009 at 14:45
-
Yeah, I'm all for google as well, but a collection of everything in one thread relating to this topic? Not bad...– rballMar 27, 2009 at 16:55
This diagram is specifically helpful in determining the order of events, but doesn't elaborate on them in any detail.
This doesn't directly answer the Page lifecycle question but this covers the Global event lifecycle with events like BeginRequest and EndRequest. It's good to understand how those work in relation to Pages.
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5771721.html