Since I spent some time today working with control extenders and exactly where in the page lifecycle to do what, I thought Iād share the whole list.
If (!IsPostBack)
- Begin PreInit
- End PreInit
- Begin Init
- End Init
- Begin InitComplete
- End InitComplete
- Begin PreLoad
- End PreLoad
- Begin Load
- End Load
- Begin LoadComplete
- End LoadComplete
- Begin PreRender
- End PreRender
- Begin PreRenderComplete
- End PreRenderComplete
- Begin SaveState
- End SaveState
- Begin SaveStateComplete
- End SaveStateComplete
- Begin Render
- End Render
If(IsPostBack)
- Begin PreInit
- End PreInit
- Begin Init
- End Init
- Begin InitComplete
- End InitComplete
- Begin LoadState
- End LoadState
- Begin ProcessPostData
- End ProcessPostData
- Begin PreLoad
- End PreLoad
- Begin Load
- End Load
- Begin ProcessPostData (Again)
- End ProcessPostData (Again)
- Begin Raise ChangedEvents
- End Raise ChangedEvents
- Begin Raise PostBackEvent
- End Raise PostBackEvent
- Begin LoadComplete
- End LoadComplete
- Begin PreRender
- End PreRender
- Begin PreRenderComplete
- End PreRenderComplete
- Begin SaveState
- End SaveState
- Begin SaveStateComplete
- End SaveStateComplete
- Begin Render
- End Render






RE: Unwinding the page lifecycle events
Pingback from Unwinding the page lifecycle events : Misfit Geek
Ouch. While it is great information, it is lists like this that make so many people dislike Web Forms completely.
I personally like PreInit and Init. Wish there was a PrePreInit or AlmostReadyToGetStartedInit.
RE: Unwinding the page lifecycle events
Pingback from Twitter Trackbacks for Unwinding the page lifecycle events : Misfit Geek [misfitgeek.com] on Topsy.com
It is great
RE: Unwinding the page lifecycle events
Pingback from Unwinding the page lifecycle events | I love .NET!
interested
Still the performance is way better than the competitors, and flexible enough too. Might be a bit hard to get it the first time, but have seen worst things in programming. I’d still use ASP.NET Pages and not planning to change to MVC.
Thanks for the list, will add it to my favorite resources.
Nice.
Isn’t there a page on MSDN with this list? Including explanantion on what it does and what you should do where?
If not, you should make it happen, misfitgeek!
You can find a somewhat more complete list here: weblogs.asp.net/…/asp-net-events.
You guys should add very important missing event ReloadIEifCrashed.
Marcel – You may be the first person to post sarcasm AND have the courage to include a real link back !
I’m so impressed I’m actually going to submit your feature request. (Though I can’t guarantee it makes it in to the next version
)
Hi,
Thank you for this useful blog, But I have a question, what if you use MasterPage and a base class for your web forms?
Thank again
HI Kourosh,
What do you mean ?
-Joe
Great post Joe.
But one thing that I am concerned about is where session lives. The docs say, in v2 of ASP.Net, that session should be available in the Init functions in the next release of ASP.Net. I checked, in v4 of ASP.Net, and tested a page, but session is still not available in Init functions. Guess the softies miss that one, I know I was disappointed.
It would be great to see a similar list for controls, including specific lists for the various base classes of controls, including when an in what order data binding related events occur.
Also, a suggestion for a future version: controls cannot use IsPostBack to determine first-time initialization or event logistics, such as these lists, the way pages can. For controls, this is determined instead by whether they are being created for the first time or reconstituted from view state. Even on post back, controls can be newly created (i.e. templated controls may choose to bind and instantiate templates on a postback). But there is no property that reveals this. So, I suggest an IsReload property for controls. While one can override LoadControlState, and set a flag there, to do that oneself, this is an impediment to beginning ASP.NET developers who want to use usercontrols.
Please explain indepth about the events
great list
Joe – OMG I didn’t post that. (my e-mail probably doesn’t match, as you see the avatar is not the same) It’s funny though..
ok, what is new ?
Thanks for the great list
Great post, this is a very importent list to keep in mind while working with asp.net, usercontrols and webcontrols.
nice blog..
awesome.
joe – that would’ve been nice if you can provide examples for each one them during the page life cycle.
RE: Unwinding the page lifecycle events
links for 2010-01-26
Hello, How are you?
I’m from Iran.
I know that you are not interested in Iran
But, I want to learn Asp.Net More.
However, Can you Help me?
Thanks again.
Hi Hamid,
In fact, I’m very interested in Iran and have many friend in your country. I’ll email you !
-Joe
RE: Unwinding the page lifecycle events
Today’s Bookmarks (Jan 27 2010)
Joe,
This is good, but now you need to fold in all the events that get included with data binding. I’ve just spent a large amount of time hassling with that. Apparently MSDN is wrong when it indicates that Databinding events for controls happen before the Page PreRender events. It’s more like Page.PreRender, mycontrol.Databinding, mycontrol.DataBound, mycontrol.PreRender. Might seem esoteric, but it was critical today…
Hi,Mr Joe.
An error occurred during the compilation of web pages that to prevent to display my web page.
With this message in statusbar:
\\C:\Windows\System32\Shdoclc.dll/dnserror
Thank you very much.
Great Post to understand ASP.Net Page Life Cycle!
For more information follow the link msdn.microsoft.com/…/aa479007.aspx