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

1

19

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.

Sebiferous answered 5/11, 2008 at 16:23 Comment(1)
Just had this problem, was using IsAsync instead of ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack!!!Villainage
C
24

Use ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack

Canea answered 5/11, 2008 at 16:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.