rohancragg
rohancragg

Reputation: 5136

How can you tell if a method is being run in UpdatePanel postback?

How can I tell if a method is running in the context of an AJAX postback (i.e as the result of a UpdatePanel (asynchronous) postback)?

According to egoldin Page.IsAsync is a very common confusion that has absolutely nothing to do with AJAX.

The correct approach is to use ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack.

Upvotes: 20

Views: 3379

Answers (1)

baretta
baretta

Reputation: 7595

Use ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack

Upvotes: 25

Related Questions