3. IIS Life Cycle
First Step is IIS
Yes
Application
Manager Create
App Domain
Is This
First
Request
No
App Domain Create
Hosting Environment.
In Hosting Environment we have HttpContext, HttpRequest and HttpResponse
Is This
First
Request
Yes
Get HttpApplication from Pool
Create HttpApplication Object.
If we have global .asax Object
then global.asax object will be created
Process The Request (it will trigger Page Life Cycle)
No
Assign HttpApplication
to core Object.
4. Page Life Cycle
Page life cycle is the same during partial page postback as it is during full page postback.
The page life cycle starts with a call to the ProcessRequest(). This method is used to initialize the page control hierarchy.
Stage 1: PreInit
When asp.net webpage visited first time it will auto generate a class(Contain Control Information). And store in Temporary
asp.net folder (WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files).
• Set Master page
• Set Theme
• Set is postback Property
• Set IsCrossPagePostback
Stage 2: Init
Initialize Control Property
Stage 3: Load View State
It will only happen when page has been postback.
InitComplete event Fire
Stage 4: Load PostBackdata
All those control who implement IPostbackDataHandler. Never maintain view state data.
Fire LoadPostData() to load postback data.
PreLoad Event Fire
Stage 5: Load
All control fully loaded here.
Stage 6: Raise Postback
Raise Postback Event
Control Event
Load Complete Event
5. Page Life Cycle
Stage 7: PreRender
Make final change to the content of the page and its controls
Stage 8: Save view State
All view data is serialized into base64 encoding string
Stage 9: Render
All custom and user control incorporate in this level.
A user Control automatically incorporate rendering.
Stage 10: Unload
Closing connection, and other request specific task.
6.
7. Thank You
For any Query
Feel free to mail me
Brajesh.mymailbox@gmail.com