Asp.net life cycle
I want to details about asp.net life cycle
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ravikumar GPosted May 30, 2013, 11:41 PM
Neha SharmaPosted May 30, 2013, 8:26 AM
Page life cycle is about the whole process of a page from init to load infront of user.It allows below steps :
Reference: http://msdn.microsoft.com/en-us/library/ms178472(v=vs.100).aspx
1. Page request :
The page request occurs before the page life cycle begins. When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.
2. Start :
In the start stage, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. The page also sets the UICulture property.
3. Initialization:
During page initialization, controls on the page are available and each control's UniqueID property is set. A master page and themes are also applied to the page if applicable. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.
4. Load :
During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.
5. Postback event handling :
If the request is a postback, control event handlers are called. After that, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page. (There is an exception to this sequence: the handler for the event that caused validation is called after validation.)
6. Rendering :
Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page's Response property.
7. Unload :
The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and cleanup is performed.
Hope it ll help you .
Ravikumar GPosted May 30, 2013, 7:03 AM
Pankaj PandeyPosted May 30, 2013, 5:46 AM
http://www.codeproject.com/Articles/73728/ASP-NET-Application-and-Page-Life-Cycle
http://msdn.microsoft.com/en-us/library/ms178472(v=vs.100).aspx
http://www.dotnettutorials.com/tutorials/performance/page-life-cycle-asp.aspx
try this