May 2 2007

Microsoft ASP.NET AJAX - Request Life Cycle

Category: AJAX-ATLAS | Telerik ControlsBil@l @ 21:32

I have recently started reading about ASP.NET AJAX. I have been always writing the AJAX code manually using the XMLHttpRequest object and other third-party great controls like the Telerik control!

I decided to work with the FREE Microsoft ASP.NET AJAX.

I would like to share with you a very important issue which is the request-life-cycle. The PageRequestManager that is created on the client side once partial page update is enabled, fires several events in the following order that you can attach your own custom events to:

  1. It first creates a request to the server using the WebRequest client side object
  2. InitializeRequest event fires
  3. BeginRequest event fires
  4. A callback method will be executed once the response is back from the server
  5. PageLoading event fires
  6. UpdatePanels on the page are now updated with the new content
  7. PageLoaded event fires
  8. Load
  9. EndRequest event fires

The items in bold represent the events that will fire during the life of a request from the time it gets created to the time it gets destroyed!

Hope this helps,
Regards

 

Tags: ,

Comments are closed