ASPAlliance.com : The #1 Active Server Pages .NET Community The #1 ASP.NET Community
Search   Search

Subscribe   Subscribe

Powered by ORCSWeb Hosting


Site Stats


Powered By ASP.NET
 
Featured Sponsor

Featured Columnist


Featured Book
Designing Microsoft ASP.NET Applications
Designing Microsoft ASP.NET Applications

Find Prices


New! asp.netPRO

We publish our articles in the standard RSS format.

Powerful .NET Email Component

Code Sharing Software
Home Profile Articles Demos Print
Paul Wilson's ASP.NET Corner
ASP.NET v2.0: Update on the Page Lifecycle
ASP.NET v2.0: Update on the Page Lifecycle

ASP.NET v2.0: Update on the Page Lifecycle

Paul Wilson
www.WilsonDotNet.com
www.ASPAlliance.com/PaulWilson

Previous Article            Page Events: Order and PostBack            Next Article

Overview

Read the original Page Events: Order and PostBack for more details. ASP.NET v2.0 (Whidbey) adds Pre and Complete versions of the Init and Load events, as well as a Complete version for the PreRender event. There are also some new internal methods for Personalization and Themes/Skins, as well as a ControlState that is different from ViewState. My favorite (at the moment anyhow) is the TestDeviceFilter method, which can be overridden to implement Dynamic Masters using Filters. The new ASP.NET v2.0 page/control methods are indicated in bold type in the comprehensive lifecycle chart provided below:

MethodPostBackControlsVirtual

ConstructorAlwaysAllYes
ConstructAlwaysPageYes
TestDeviceFilterAlwaysPageYes
AddParsedSubObjectAlwaysAllYes
DeterminePostBackModeAlwaysPageYes
OnPreInitAlwaysPageYes

LoadPersonalizationDataAlwaysPageNo
InitializeThemesAlwaysPageNo
OnInitAlwaysAllYes
ApplyControlSkinAlwaysAllNo
ApplyPersonalizationAlwaysAllNo
OnInitCompleteAlwaysPageYes

LoadPageStateFromPersistenceMediumPostBackPageYes
LoadControlStatePostBackAllYes
LoadViewStatePostBackAllYes
ProcessPostData1PostBackPageNo
OnPreLoadAlwaysPageYes
OnLoadAlwaysAllYes

ProcessPostData2PostBackPageNo
RaiseChangedEventsPostBackPageNo
RaisePostBackEventPostBackPageNo
OnLoadCompleteAlwaysPageYes
OnPreRenderAlwaysAllYes
OnPreRenderCompleteAlwaysPageYes

SavePersonalizationDataAlwaysPageNo
SaveControlStateAlwaysAllYes
SaveViewStateAlwaysAllYes
SavePageStateToPersistenceMediumAlwaysPageYes
RenderAlwaysAllYes
OnUnloadAlwaysAllYes

Version Note

This article was based on an early Alpha release of ASP.NET v2.0 and VS.NET Whidbey. It is possible that some implementation or v1.* compatibility details will change.

Author Bio

Paul Wilson is a software architect in Atlanta, currently with PRG-Schultz. He specializes in Microsoft technologies, including .NET, C#, ASP, SQL, COM+, and VB. His WilsonWebForm Control allows Multiple Forms and Non-PostBack Forms in ASP.NET. He is a Microsoft MVP in ASP.NET and is also recognized as an ASPInsider. He is a moderator on Microsoft's ASP.NET Forums, as well as one of the top posters. He is holds the MCSD, MCAD, MCDBA, and MCSE certifications. Please visit his website, www.WilsonDotNet.com, or email him at Paul@WilsonDotNet.com.
 Copyright © 2000-2003 ASPAlliance.com  Page Rendered at 11/22/2009 12:57:59 AM