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.
问题:
回答1:
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
回答2:
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
回答3:
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.
回答4:
This diagram is specifically helpful in determining the order of events, but doesn't elaborate on them in any detail.
Original link
回答5:
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