Thursday, March 29, 2012

sequence in which page is loaded

I want to know the sequence of functions that are invoked when a page is loaded like page_init is always invoked before page_load and so on ... i need the exact sequence of all the events of a page that if i put code in each event which is going to work in which sequence.

Regards,

Harris Moinno one has even viewed my post yet ...... :(((((

Anyways i have found the result myself might be helpful for someone out there as well .... so posting it here

SEQUENCE OF THE PAGE EVENTS IN WHICH THEY ARE FIRED

1. Initialize:
==========
Initialize settings needed during the lifetime of the incoming Web
request.

2. Load view state:
================
At the end of this phase, the ViewState property of a control is
automatically populated as described in Maintaining State in a Control.
A control can override the default implementation of the LoadViewState
method to customize state restoration.

3.Process postback data:
======================
Process postback data Process incoming form data and update properties
accordingly.

4. Load:
=======
Perform actions common to all requests, such as setting up a database
query. At this point, server controls in the tree are created
and initialized, the state is restored, and form controls reflect
client-side data.

5. Send postback change notifications:
=================================
Raise change events in response to state changes between the current and
previous postbacks.
Note Only controls that raise postback change events participate in this
phase.

6. Handle postback events:
========================
Handle the client-side event that caused the postback and raise appropriate
events on the server.


7. Prerender:
===========
Perform any updates before the output is rendered. Any changes made to the
state of the control in the prerender phase can
be saved, while changes made in the rendering phase are lost.

8. Save state:
============
The ViewState property of a control is automatically persisted to a string
object after this stage. This string object is sent to the
client and back as a hidden variable. For improving efficiency, a control
can override the SaveViewState method to modify the ViewState
property.

9. Render:
=========
Generate output to be rendered to the client.

10. Dispose:
===========
Perform any final cleanup before the control is torn down.

11. Unload:
==========
Perform any final cleanup before the control is torn down. Control authors
generally perform cleanup in Dispose and do not handle this event.

0 comments:

Post a Comment