My personal notes those days

Main menu

Post navigation

Postback VS Callback

I was a little confused between Postback and Callback, thanks to Mr. Cruz Boon who explained this confusion in his article ASP.NET Callback – and WHY?

Here is a summary copied from his article:

Postback

All contains of the web page (ViewState, Hidden Controls…etc.) will be send back to the server. During the browser process response of the request, it will request all resources again. Like Javascript files, Images, CSS files… .etc.

Callback

All contains of the web page (ViewState, Hidden Controls…etc.) will be send back to the server. Here I have to highlight one thing, ViewState objects do travel back to server but you are not able to modify any value of controls. This is because the page life cycle for Callback doesn’t include SaveViewState and Render events. For detail, you can refer to Brij Bhushan Mishra’s blog – Exploring Client Callback

Update Panel

All contains of the web page (ViewState, Hidden Controls…etc.) will be send back to the server. But what had been return in the response package is only content of the area that I put into the Update PanelContent Template. The page life cycle for this request is the same as Postback but just it will not refresh/update for the controls out of the Update Panel.

Summary

Postback: is the easiest way to program by using ASP.NET Web Form but It will make the traffic from server becomes heavy.

Callback: not easy to implement if compare among the other two. But it produce light traffic from server and return only what the request need.