brady gaster

yadnb

event models

my partner-in-crime Mike Palermo and i are currently developing some new courseware. this course, Advanced ASP.NET, will provide students a more in-depth look at the underpinnings of the ASP.NET development paradigm. one of the things we're going to cover in this class is an advanced, deep view of the event model. explicitly, we're going to carefully go over the order of priority with the application, page, and control events that automatically fire during every page load. during demo-code development, i created a series overridden functions in a simple control, a page containing that control, and the global.asax file's codebehind that lives within the web application where the form is executing.

for the sake of brevity, here's the output of the code. it shows you - with pretty much no room for confusion - the order in which all of the events fire. thought some would consider this helpful. remember - this text was generated in the order the overrides are processed on the server. to put it in a non-techy way, this is about as “straight from the horse's mouth“ as you can get:

Global_BeginRequest
Global_AuthenticateRequest
Global_AuthorizeRequest
Global_ResolveRequestCache
Global_Session_Start
Global_AcquireRequestState
Global_PreRequestHandlerExecute
Page_DeterminePostBackMode
Control_OnInit
Control_TrackViewState
Page_Init
Page_TrackViewState
Page_OnLoad
Control_OnLoad
Page_EnsureChildControls
Page_CreateChildControls
Page_OnPreRender
Control_EnsureChildControls
Control_CreateChildControls
Control_OnPreRender
Page_SaveViewState
Control_SaveViewState
Page_Render
Page_RenderChildren
Control_Render
Control_RenderChildren
Control_OnUnload
Page_OnUnload
Global_PostRequestHandlerExecute
Global_ReleaseRequestState
Global_UpdateRequestCache
Global_EndRequest
Global_PreSendRequestHeaders
Global_PreSendRequestContent
Global_PreSendRequestContent

Comments

HumanCompiler said:

That's awesome, thanks for the list! :)
# August 6, 2003 3:28 PM

jonte said:

Kick ass. Very useful.

thx.
# May 7, 2004 4:10 PM

TrackBack said:

# October 12, 2004 5:17 AM

TrackBack said:

# October 12, 2004 5:18 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)