Difference between Page.IsPostBack and Page.IsCallBack

Page.IsCallBack

It is getting a value indicating whether the page request is the result of a call back. Its a special postback, so a round-trip always occurs; however, unlike the classic postback, the script callback doesn’t redraw the whole page. ViewState is not updated during a callback, it is for postback. IsPostBack is true when a method in the code behind posts a page

Page.IsPostBack

Checks whether the Page is accessing the server for the first time or not. Unlike the IsCallBack, the ViewState is updated. IsPostBack is true when an AJax call, calls back a the page.

How to make a callback?

In the client side JavaScript code, if GetCallbackEventReference() method is reference, then when the JavaScript code is executed, a channel to the server is opened and an HTTP request is sent to the remote ASP.NET page.[1]

references: [1] Script Callback

Advertisements