Sunday, January 13, 2013

The Page Life Cycle of a ASP.NET Web Page

Consider what happens when a user changes a control that has the AutoPostBack property set to true:

1. On the client side, the JavaScript __doPostBack function is invoked, and the page is resubmitted to the server.

2. ASP.NET re-creates the Page object using the .aspx file.

3. ASP.NET retrieves state information from the hidden view state field and updates the controls accordingly.

4. The Page.Load event is fired.

5. The appropriate change event is fired for the control. (If more than one control has been changed, the order of change events is undetermined.)

6. The Page.Unload event fires, and the page is rendered (transformed from a set of objects to an HTML page).

7. The new page is sent to the client.

No comments:
Write comments
Recommended Posts × +