Click here to Skip to main content
13,146,742 members (81,032 online)
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 28 Jan 2013

ASP.NET Callback – and WHY?

, 28 Jan 2013
Rate this:
Please Sign up or sign in to vote.
ASP.NET callback issues.

If you are familiar with ASP.NET Web Form development, I think Postback and Callback are not new topics for you. Now, let me show the impact on traffic for each methods.


I prepared three ways to perform server request for this sample. Each of them represented by a button and they are “Postback”, “Callback” and “Update Panel” (Partial Postback).

For a better illustration, I use Fiddler to capture the traffic. And let's see what we have after click on each button.

  • Postback


For all the resources including javascript, embedded resources and web page (It can be more which including CSS files, images, media, external link… etc.) will be send to browser again even only one button begin clicked.

  • Callback


Not bad. Only web page being updated. With 1,192 bytes sent and 761 bytes received.

  • Update Panel


This one also not bad. Only web page being updated. With 1,319 bytes sent and 1,266 bytes received (As I only wrap one set of First Name, Last Name & Button controls in the Update Panel).

After this experiment, let me explain why the traffic is different for each different ways to reach server.

  • 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 Panel Content 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.


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.

Update Panel: not hard to implement but I suggest you to read Dave Ward’s blog – Why ASP.NET AJAX UpdatePanels are dangerous and have more understand on how it works before you consider to implement this.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Cruz Boon
Team Leader Powercomp Software Sdn Bhd
Malaysia Malaysia
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 5 Pin
Jasmine250129-Jan-13 10:46
memberJasmine250129-Jan-13 10:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.170915.1 | Last Updated 28 Jan 2013
Article Copyright 2013 by Cruz Boon
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid