What is the difference between AsyncPostBackTrigger & PostBackTrigger?

Controls inside an UpdatePanel by default cause a partial page update, controls outside cause a postback, using these triggers it is possible to change this behaviour as required.

From http://seminaarit.codezone.fi/video/devdays-2007/track1/2/2-ASP-dotNET_AJAX_Extensions.ppt: (dead link)

AsyncPostBackTrigger

  • Converts postbacks into async callbacks * Typically used to trigger updates when controls outside an UpdatePanel post back * If ChildrenAsTriggers="false", can be used to specify which controls inside UpdatePanel should call back rather than post back

PostBackTrigger

  • Lets controls inside UpdatePanel post back. * Typically used to allow certain controls to post back when ChildrenAsTriggers="true"

Here's a blog post which explains the difference:

In the template in an update panel, there are the options of an AsyncPostBackTrigger or a PostBackTrigger.

By default, controls outside of an update panel will trigger a normal synchronous post back. The AsyncPostBackTrigger “wires” up these controls to trigger an asynchronous post back. Conversely, controls declared inside an update panel will trigger an asynchronous call by default. The PostBackTrigger short circuits this, and forces the control to do a synchronous post back.


1. AsyncPostBackTrigger

it is the one which enforces Asynchonous post back of the Page.., i.e. the AJAX way. The data will be transacted without full post back. When you are using functionalities like login, you may use this.

Ex. You are having two dropDowns Viz., Countries and States. the states should be loaded when a country is selected and it should be changed on Countries change.

You may use AsyncPostBackTrigger in this scenario, which will populate the states ddl without full post back.

2. PostBackTrigger

It is the one which does not follow the AJAX functionalities, but the full post back as usually(as without using UpdatePanel). Situtions are there where you would not like to enforce Partial Post back (as explained in Point 1. above).

Like you are having FileUpload Control withing the UpdatePanel and when you do it by AsyncPostBack, you will not get any values to the server. It requires Full PostBack. in such a case you should use this trigger.