asp.net2.0 页面生命周期方法
asp.net2.0 页面生命周期方法 asp.net2.0 页面生命周期方法
方法
活动
Constructor
Always
Construct
Always
TestDeviceFilter
Always
AddParsedSubObject
Always
DeterminePostBackMode
Always
OnPreInit
Always
LoadPersonalizationData
Always
InitializeThemes
Always
OnInit
Always
ApplyControlSkin
Always
ApplyPersonalization
Always
OnInitComplete
Always
LoadPageStateFromPersistenceMedium
Always
LoadControlState
Always
LoadViewState
Always
ProcessPostData1
Always
OnPreLoad
Always
OnLoad
Always
ProcessPostData2
Always
RaiseChangedEvents
Always
RaisePostBackEvent
Always
OnLoadComplete
Always
OnPreRender
Always
OnPreRenderComplete
Always
SavePersonalizationData
Always
SaveControlState
Always
SaveViewState
Always
SavePageStateToPersistenceMedium
Always
Render
Always
OnUnload
Always
查看页面生命周期的底层细节,我们可以看到 ASP.NET 2.0 中提供的许多功能(例如主题和个性化)将在什么地方容易实现。例如,主题在 IntializeThemes 事件中处理,而个性化数据将在 LoadPersonalizationData 中加载并稍后用于 ApplyPersonalization 方法。请注意,就哪一个 UI 元素将决定 Web 应用程序的最终外观和感觉而言,方法的顺序非常重要。