Jon's Blog

.NET Development & More

ASP.NET AJAX: Checking for Partial Postback - IsInAsyncPostBack

My initial thought is always to look for a property on the Page object, but this is actually a property on the ScriptManager.  So if you want to only execute code if it isn't a partial page post back you can do the following:

if (!scriptManagerInstance.IsInAsyncPostBack)
    // Do stuff here