ASP .Net Page Life Cycle

No.of Views880
Bookmarked0 times
Downloads 
Votes0
By  mcapassion   On  16 Feb 2010 00:02:53
Tag : ASP.NET , How to
ASP .Net Page Life Cycle
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 



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

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

Thank you

About the Author


Amit Kumar
Description :5+ years of work experience in ASP.NET C# applications development and database design. 2+ years in SharePoint Worked on SQL Server Worked on Object oriented design and UML Programming Languages/Framework : C#.Net, VB.Net, VB 6.0, VBA,Com/DCom Web Languages : HTML, DHTML, ASP, JavaScript, ASP.Net Operating Systems : WIN 98/2000NT/XP/2003 Server DBMS/RDBMS : MS-Access 2000, ORACLE 8.0, MS-SQL Server 2000, MS-SQL Server 2005 Designing Tools : Microsoft Visio 2003 Versioning Tools : Microsoft Visual Source Safe 6.0 Content Management : Plumtree 4.5 WS, SharePoint (MOSS) Experience in developing Portals using Plumtree 4.5 WS and SharePoint. Experience in user-interface design, user controls, web parts and layout for web-based applications using HTML, CSS, ASP and ASP.net.

Occupation :Software Engineer
Company : Haryana.
Location : India
 
Sign Up to vote for this article
 
About Author
 
mcapassion
Occupation-Not Provided
Company-Not Provided
Member Type-Fresh
Location-Not Provided
Joined date-08 Jul 2009
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top