Interested in Sitecore?

Apply for our Mentorship Program by emailing your resume to chris.williams@techguilds.com. Check out our ASP.NET QuickStart and C# QuckStart Libraries. Below is my latest articles.

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.

2 comments:

Matt said...

Just what I was looking for. Thanks :-)

Matt said...

Just what I was looking for. Thanks :-)