Project Description
The Callback is among the novelties of the ASP. Net 2.0.
shows the power of callback combined with javascript methods can make the Asp.net application more lighter.
update a specific control in the page and not the entire page without using AJAX

Complete Article @ CodeProject: http://www.codeproject.com/KB/webforms/CallBackWebControls.aspx

Introduction

In this article, I present another aspect of communication in the Asp. Net 2.0, named "CallBack” and how it can be used for a web application asp.net soft light and especially preformative.

For this I created a set of "WebControls" based on the "CallBack" not on "PostBack" but that works exactly like the standard controls of Asp.net 2.0

I will first start by explaining important concepts for understanding the article and finally I'll show you an example in practice


CallBack ?

The Callback is among the novelties of the ASP. Net 2.0, it can communicate with the server without posting the whole page ..

The difference between Callback and postback is that in the PostBack whenever you click a button, all the HTML of the page and its controls is regenerated (Render).
By cons in the callback is not the case and it is very important! Why regenerate all the HTML page? Is it important to do? when I just want to add a row in my GridView (for example).

So for a web application slightly, the "Render" of a control should be targeted and not overall ..

I mean no need to generate all the html code of the page and its controls.

You can use "Ajax control" but I do not know the code generated behind, so I can control what happens in my application.

Sample

In this Demo there is 4 controls in the page, each of them update another Asp.net standard control:

sample.jpg
  • AEDropDownList changes the backcolor of the Asp.net button
  • The AEbutton (Check/Incheck) the Asp.net Checkbox
  • The AEChechbox makes the Asp.net Textbox Readonly
  • The AETextbox changes the Text of the Asp.net button

Last edited Jan 12, 2010 at 12:17 PM by Kadaoui_el_mehdi, version 5