C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Page_Life Cycle


Posted Date: 02 Jul 2008    Resource Type: Definitions    Category: General
Author: SriramMember Level: Gold    
Rating: Points: 6



the following are the sequence of events taking place when an ASP.NET page is loaded. Aside each event is the description of when it occurs :


  • BeginTranaction - only if the request is transacted

  • Init - every time a page is processed

  • LoadViewState - Only on postback

  • ProcessPostData1 - Only on postback

  • Load - every time

  • ProcessData2 - Only on Postback

  • RaiseChangedEvent - Only on Postback

  • RaisePostBackEvent - Only on Postback

  • PreRender - everytime

  • BuildTraceTree - only if tracing is enabled

  • SaveViewState - every time

  • Render - Everytime

  • End Transaction - only if the request is transacted

  • Trace.EndRequest - only when tracing is enabled

  • UnloadRecursive - Every request





Responses

Author: Sriram    05 Oct 2008Member Level: Gold   Points : 2
Stage


Description

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.

Start


In the start step, 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. Additionally, during the start step, the page's UICulture property is set.

Page initialization


During page initialization, controls on the page are available and each control's UniqueID property is set. Any themes are also applied to the page. 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.

Load


During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.

Validation


During validation, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page.

Postback event handling


If the request is a postback, any event handlers are called.

Rendering


Before rendering, view state is saved for the page and all controls. During the rendering phase, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream of the page's Response property.

Unload


Unload is called 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 any cleanup is performed.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Page cycle  .  Asp.net page  .  Asp.net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Authentication and Authorization
Previous Resource: C# Definition
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use