Ajax Client Side Event Cycle

Our team lead recently passed around a brilliant diagram compiled by Milan Negovan of AspNetResources which explains the ASP.NET Ajax Client Side Event Cycle.

I’m linking to it here so I can reference it in the future and hopefully give it a bit extra publicity which it well deserves. Have a look.

Milan shows how the page events, Application events and PageRequestManager events interract during AJAX calls and clearly explains how to hook into those events i.e. add your own handlers. It also explains exactly where UpdatePanel fits into the picture and clearly states when and who calls what event.

To whet your appetite…

When partial-page rendering with UpdatePanel controls is enabled, the key client
events are the events of the PageRequestManager class. These events enable you to
handle many common scenarios. These include the ability to cancel postbacks, to give
precedence to one postback over another, and to animate UpdatePanel controls when
their content is refreshed.

To add or remove handlers for events raised by the Application and
PageRequestManager classes, use the add_eventname and remove_eventname methods
of those classes…

Top work Milan!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: