.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

Explain the life cycle of an ASP .NET page.

Posted By :Shashi Ray     Posted Date :November 26, 2008    Points :10   Category :ASP.Net 
Life cycle of ASP.Net Web Form
Page Request >> Start >> Page Init >> Page Load >> Validation >>
PostBack Event Handling >> Page Rendering >> Page Unload
Page Request - When the page is requested ASP.Net determines
whether the page is to be parsed and compiled or a cached verion
of the page is to be sent without running the page.
Start - Page propertied REQUEST and RESPONSE are SET, if the
page is pastback request then the IsPostBack property is SET and
in addition to this UICulture property is also SET.
Page Initilization - In this the UniqueID of each property is SET.
If the request was postback the data is not yet loaded from the
Page Load - If it was a postback request then the data gets loaded
in the control from the ViewState and control property are set.
Validation - If any control validation present, they are performed
and IsValid property is SET for each control.
PostBack Event Handling - If it was a postback request then any
event handlers are called.
Page Rendering - Before this the viewstate is saved from the page
and RENDER method of each page is called.
Page Unload - Page is fully rendered and sent to the client(Browser)
and is discarded. Page property RESPONSE and REQUEST are unloaded.

You can also find related Interview Question to Explain the life cycle of an ASP .NET page.  below: 

Which is the first event in page life-cycle Event?

Page_PreInit is the First event that will be executed on the page. (More...)

Which is the first event in page life-cycle Event?

This Preinit event will first check this things Check the IsPostBack property to determine whether this is the first time the page is being processed. Create or re-create dynamic controls. Set a master page dynamically. Set the Theme property dynamically. Read or set profile property values. (More...)

page life cycle in Asp.net?

1. OnInit (Init) -- Inializes all Child controls on the Page

2. LoadControlState -- Loads the Control State

3. LoadViewState -- Loads the View State

4. LoadPostData -- Control properties are set according to the received form data

5. Load -- Actions can be performed on the controls as all the pre-activities are complete by this time

6. RaisePostDataChangedEvent -- This event is raised if data has been changed in previous and Current Postbacks.

7. RaisePostBackEvent -- This event handles the user action that caused the Postback.

8. PreRender (OnPreRender) -- This event takes place between postback and saving viewstate. Till this stage changes will be saved to the control.

9. SaveControlState -- Self Explanatory

10. SaveViewState -- Self Explanatory

11. Render -- Generates artifacts at Client side (HTML,DHTML,Scripts) to properly display controls

12. Dispose -- Releases unmanaged Resource ( Database connections, file handles)

13. Unload -- Releases managed Resources ( Instances created by CLR) (More...)

What are different stages of ASP.Net Page Life cycle?

Each ASP.Net Web page performs following stages/events

Page Initialization (Page_Init event)
Page Loading (Page_Load event)
Page Prerender (Page_Prerender)
Page Render (Page_Render)
Page Unload (Page_Unload)


Explain the Shaepoint WebPart life cycle?


. OnInit
. OnLoad
. CreateChildControls
. OnPreRender

what are the list the events in page life cycle.

Below is the list of page life cycle in asp.net-
1) Page_PreInit
2) Page_Init
3) Page_InitComplete
4) Page_PreLoad
5) Page_Load
6) Page_LoadComplete
7) Page_PreRender
8)Render (More...)

What's Sharepoint page life cycle?

Sharepoint page Life Cycle:

1.User request the SharePoint page using http
2.Asp.Net calls the WSS file Provider
3.WSS file Provider return the pages from file or database
4.page is parsed by SafeMode parsor if required
5.Returned page is compiled by Asp.Net compiler
6.WSS file Provider collects the page layout class and complies it
7.Asp.Net engine adds SharePoint Context Data to the site meta data and retrieves the associatedmaster page.
8.Master page got compiled responded back to the user. (More...)

When during the page processing cycle is ViewState available?

After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

Explain differences between the page execution lifecycle of an ASP.NET page and an ASP.NET AJAX page?

In an asynchronous model, all the server side events occur, as they do in a synchronous model. The Microsoft AJAX Library also raises client side events. However when the page is rendered, asynchronous postback renders only the contents of the update panel, where as in a synchronous postback, the entire page is recreated and sent back to the browser. (More...)

When during the page processing cycle is ViewState available?

The view state is available after the Init() and before the Render() methods are called during Page load. (More...)

When during the page processing cycle is ViewState available?

After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

What are the phases in the Systems Development Life Cycle?

1 Initiation/planning
2 Requirements gathering and analysis
3 Design
4 Implementation
5 Maintenance (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend