Thursday, December 11, 2008

Detecting an Ajax Async PostBack on page_load

I had to search a few times to find this. People were giving very unique answers but this one is the correct one:

if(!ScriptManager.GetCurrent(this).IsInAsyncPostBack)
{
//code when it is a sync postback
}
else
{
//code when it is an async postback
}

If you have any tips, tricks, resources you would like to share with the guild please email them to Susan Fischer at susan@clinchportal.com and we will post them.

0 comments: