What is the difference between IsPostBack, IsAsync and IsCallback?
asp.net, asp.net-4.0, httpwebrequest, postback
Solution
The `IsAsync` is independent of the type of request made by the client and its used to identify a page that is processed asynchronously as described in the documentation:
Gets a value indicating whether the page is processed asynchronously.
You can read more about asynchronous pages in this MSDN Magazine article Asynchronous Pages in ASP.NET 2.0.
The `IsCallback` is used to identify a client callback, see Implementing Client Callbacks Programmatically Without Postbacks in ASP.NET Web Pages and finally the `IsPostback` identifies a request that resulted from the submission of the form associated with the page. The `IsPostback` by itself cannot be used to identify a postback that will fully render the page from one that will do a partial rendering, for example, if you are using an `UpdatePanel`.
In order to identify a postback request that will only perform partial rendering you will need to check that `IsPostback` is true and `ScriptManager.GetCurrent(this.Page).IsInAsyncPostBack` is also true.
Also of interest to this topic How to: Determine How ASP.NET Web Pages Were Invoked.
Problem
I was writing code in `Page_Load` and I used `IsPostBack` in the first place but then I came across with `IsAsync` and `IsCallback` properties. I started to think and they look like somewhat the same. From google I found some information: - `IsPostBack` is true when the page is posted via a form method, I agree 100%. - `IsCallBack` is true when the page has been called back from an AJAX call, Then for what purpose IsAsync is for? from MSDN "`IsCallBack`: Gets a value that indicates whether the page request is the result of a callback." - `IsAsync` when an ASP.net AJAX partial update is made ,its an Asynchronous postback. However I still have some questions: - What is a callback and how it is different from a postback. - Clearly differentiate among IsPostBack, IsAsync and IsCallback. - Currently I'm working on a WebApp, which can perform postBack through jQuery Ajax. So to identify the jQuery Ajax I should use IsPostBack. Useful links: Difference between IsCallback and IsPostback