GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  
 ASP.NET  |  Question 164 of 164    Print  
ASP .Net Page Life Cycle
Explain the life cycle of an ASP .NET page.


  
Total Answers and Comments: 12 Last Update: October 15, 2009     Asked by: reenu1210 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Macson
 

1 load
2 init
3 prerender
4 unload



Above answer was rated as good by the following members:
praveen.k.mal, Filistin Peter, ravirkumar, Jisna, Ag2703, sathin, pratikgotal, azizedu, mohit_cts, shathyan, kapilsanchihar, sagar.vaidya, akshayvartak, jitendra224, VarunBhola, pratik_trixx
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
February 16, 2009 04:38:25   #1  
Macson Member Since: February 2009   Contribution: 2    

RE: ASP .Net Page Life Cycle

1 load
2 init
3 prerender
4 unload


 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 2Overall Rating: +1    
April 01, 2009 16:23:51   #2  
qubocuty Member Since: April 2009   Contribution: 1    

RE: ASP .Net Page Life Cycle
page init
page prerender
page load
page unload

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 3Overall Rating: -1    
April 22, 2009 10:15:18   #3  
svallury Member Since: April 2009   Contribution: 1    

RE: ASP .Net Page Life Cycle
Remember SILVER and add an U at the end

Start
Init
Load
Validate
Error Handling
Render
and
Unload

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
April 30, 2009 15:52:42   #4  
aanand_agrawal Member Since: April 2009   Contribution: 8    

RE: ASP .Net Page Life Cycle

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


 
Is this answer useful? Yes | NoAnswer is useful 8   Answer is not useful 0Overall Rating: +8    
May 06, 2009 02:13:29   #5  
vsateeshk Member Since: January 2007   Contribution: 7    

RE: ASP .Net Page Life Cycle
Object Initialization
Load Viewstate Data
LoadPostData
Object Load
Raise PostBack Change Events
Process Client-Side PostBack Event
Prerender the Objects
ViewState Saved
Render To HTML
Disposal

 
Is this answer useful? Yes | No
June 05, 2009 09:19:17   #6  
avi1983 Member Since: June 2009   Contribution: 1    

RE: ASP .Net Page Life Cycle
Page Request
Page Init
Load
validation
Postback event handling
Rendering
Unload

 
Is this answer useful? Yes | No
June 08, 2009 07:37:57   #7  
srinivasulu.p Member Since: June 2009   Contribution: 1    

RE: ASP .Net Page Life Cycle
page_preinit
page_ init
page_load
page_prerender
page_unload

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 19, 2009 02:21:35   #8  
shashankkale Member Since: April 2009   Contribution: 7    

RE: ASP .Net Page Life Cycle

1. Page Request

2. Start

3. Page Initialization

4. Load

5. Validation

6. Postback and event Handling

7. Rendering

8. Unload


For The Page Execution Life Cycle Just Remember SILVER.

S-Start

I-Page Initialization

L-Load

V-Validation

E-Postback event handling

R-Rendering


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 3Overall Rating: -2    
August 24, 2009 04:24:55   #9  
sathin Member Since: August 2009   Contribution: 6    

RE: ASP .Net Page Life Cycle

Set of subprograms that are executed towards each time of web page processing
are called page life cycle events


Page Preinit

This will be executed before memory initialization for web page [before
constructing web page]

Attaching theme master page dynamically to webpage is possible using preinit
event proc


Page init

This will be executed when memory is initialized for webpage


Page load

This will be executed when submitted data and controls are loaded

Database connectivity reading submitted data can be placed within pageload


PagePrerender

This will be executed before rendering html content from server side control

Control behaviour can be changed b4 producing client side control


Page Unload

This will be executed once memory is released for webpage

Closing database connection


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
September 10, 2009 04:51:57   #10  
kirangiet Member Since: June 2009   Contribution: 24    

RE: ASP .Net Page Life Cycle
Following are the events occur during ASP.NET Page Life Cycle:

1)Page_PreInit
2)Page_Init
3)Page_InitComplete
4)Page_PreLoad
5)Page_Load
6)Control Events
7)Page_LoadComplete
8)Page_PreRender
9)SaveViewState
10)Page_Render
11)Page_Unload

Among above events Page_Render is the only event which is raised by page. So we can't write code for this event.
Note:These event are not case sensitive. So we can write Page_Init as page_init in C#. Controls Events are the event raised when some action is performed on controls.

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape