Join Dotnetcodes DotnetCodes.com is online Discussion Forum for Software professionals . It lets you find friends around the world and Create professional network that share similar interests as you. Get help on ur projects by industry specialists. Also get answers to all ur technical/placement related querries.Get an edge over others.
Already MemberClick here to login
ASP.net MVC Interview Questions Answers Interview Questions
Get Started Developing for Android Apps with Eclipse Articles
Serial Number in SSRS Articles
.Net framework 4.0 Interview Questions Answers Interview Questions
SQL server reporting services Interview Questions (SSRS) part 1 Articles
Whats New in ASP.NET 4.0 Part 2 Articles
How to Print a Crystal Report direct to printer Articles
Difference between Encapsulation and Abstraction Interview Questions
Explaining SDLC -System Development Life Cycle Articles
Html5 interview questions and answers Interview Questions
SharePoint 2010 interview Questions Answers Interview Questions
Infosys Interview Questions Interview Questions
Dynamic Menu using HTML List Tag and CSS in ASP.Net Articles
Populate or bind Dropdownlist in Asp.net using Jquery and Json Articles
ASP.NET MVC Overview Interview Questions
Submit Articles | More Articles..

ASP .Net Page Life cycle

Posted By: rakesh On:6/7/2011 10:26:32 PM in:Articles Category:ASP.NET Hits:5770
Intoduction to ASP .Net Page Life cycle

1. OnInit (Init) Initializes each child control of the current page.

2. LoadControlState: Loads the ControlState of the control. To use this 
method the control must call the Page.RegisterRequiresControlState method in 
the OnInit method of the control.

3. LoadViewState: Loads the ViewState of the control.

4. LoadPostData: Is defined on interface IPostBackDataHandler. Controls that 
implement this interface use this method to retrieve the incoming form data and 
update the control s properties accordingly.

5.Load (OnLoad): Allows actions that are common to every request to be 
placed here. Note that the control is stable at this time; it has been 
initialized and its state has been reconstructed.

6. RaisePostDataChangedEvent: Is defined on the interface IPostBackData-Handler. 
Controls that implement this interface use this event to raise change events in 
response to the Postback data changing between the current Postback and the 
previous Postback. For example if a TextBox has a TextChanged event and 
AutoPostback is turned off clicking a button causes the Text-Changed event to 
execute in this stage before handling the click event of the button which is 
raised in the next stage.

7. RaisePostbackEvent: Handles the client-side event that caused the Postback 
to occur.

8. PreRender (OnPreRender): Allows last-minute changes to the control. This 
event takes place after all regular Post-back events have taken place. This 
event takes place before saving ViewState so any changes made here are saved.

9. SaveControlState: Saves the current control state to ViewState. After this 
stage any changes to the control state are lost. To use this method the 
control must call the Page.RegisterRequiresControlState method in the OnInit 
method of the control.

10. SaveViewState: Saves the current data state of the control to ViewState. 
After this stage any changes to the control data are lost.

11. Render: Generates the client-side HTML Dynamic Hypertext Markup Language 
(DHTML) and script that are necessary to properly display this control at the 
browser. In this stage any changes to the control are not persisted into 
ViewState.

12. Dispose: Accepts cleanup code. Releases any unman-aged resources in this 
stage. Unmanaged resources are resources that are not handled by the .NET common 
language runtime such as file handles and database connections.

13. UnLoad

comments powered by Disqus
User Profile
Rakesh Sinha
Sr. Technical Lead
New Delhi , India
Email :You must Log In to access the contact details.
Latest Post from :rakesh
Which party you want to vote in Loksabha elections 2019?
View: 162 | Submitted on: 10/12/2018 5:59:06 PM
Response.Redirect vs Server.Transfer
View: 450 | Submitted on: 12/27/2015 2:26:38 PM
The test form is only available for requests from the local machine.
View: 537 | Submitted on: 11/3/2015 9:54:36 PM
Difference between web service WCF and Web API
View: 5924 | Submitted on: 10/28/2015 9:23:51 PM
Which party you want to vote in Delhi assembly elections 2015?
View: 1544 | Submitted on: 12/18/2014 4:19:24 AM
Submit Articles | All Post of This User..

All rights reserved to dotnetcodes. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
Best viewed at 1024 x 768 resolution with Internet Explorer 5.0 or Mozila Firefox 3.5 or Google Crome and higher