I love the smell of AJAX in the morning.  Hmm, no more listening to Sodom till the end of the week!!

The last few days have been overwhelming.  We have been doing our best to wrap up a the beta release of r.a.d.callback.  We are finally done, and the build has gone live.  Yes it is true now!  Go get it from the beta forum, play with it and get that feedback back to us.

So, what's new and cool in there?  My favorite feature is the huge boost that the CallbackPanel got.  It is not a dumb container that only knows how to execute JavaScript on callback request anymore.  It has been promoted to a fully featured container that will AJAX-enable any control placed inside it.  Yes you read that right -- any control that you place in there will start doing AJAX requests instead of regular postbacks.  Buttons, checkboxes, grids, calendars and what not -- place them inside the AjaxifierTM and they will start submiting only the portion of the page bounded within the callback panel.

Do you have a piece of code that posts your entire page back?  Wrap it in a callback panel, and watch it being updated in separation.  I just whipped up a quick registration wizard, using Microsoft's Wizard control, available in ASP.NET 2.0:

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" DisplaySideBar="False" Height="100px" Width="300px">
  <asp:WizardStep ID="Step1" runat="server" Title="Step 1">
  <asp:Label ID="nameLabel" runat="server" Text="Hi!  What's your name?"
  <asp:TextBox ID="nameBox" runat="server" />
  <asp:WizardStep ID="Step2" runat="server" Title="Step 2">
  <asp:Label ID="Label1" runat="server" Text="Where do you live?"
  <asp:DropDownList ID="locationList" runat="server">
  <asp:WizardStep ID="Step3" runat="server" Title="Step 3">
  Thank you for registering, <%= nameBox.Text %> from <%= locationList.SelectedValue %>!</asp:WizardStep>
 <StepStyle BackColor="#FFFF80" />
 <SideBarStyle BackColor="#FFFF80" />
 <NavigationButtonStyle BackColor="Silver" BorderStyle="Groove" />
 <NavigationStyle BackColor="#FFFF80" />
 <SideBarButtonStyle BackColor="Transparent" />
 <HeaderStyle BackColor="#FFFF80" />

As you can see from the wizard declaration it asks for your name and the city where you live.  It then displays the gathered information.  The wizard runs OK, but the only problem is that it's ugly and uncool -- it does way too many postbacks.  Enter <radClb:CallbackPanel>; I just wrapped it around the wizard:

<radClb:CallbackPanel ID="CallbackPanel1" runat="server" Height="408px" Width="546px">
    <!-- the wizard declaration...  See above -->

Hey, this is the first time that I use the Wizard control, and I am doing AJAX requests already!  Zero postbacks for zero lines of code... sounds pretty good :-).  Here is the final wizard:


What will be your first Ajaxifier victim?  Drop us a line either here or at the beta forum.
Hristo Deshev is a Principal Software Engineer at Telerik
About the Author

Hristo Deshev

Hristo Deshev is a Principal Software Engineer at Telerik.


Comments are disabled in preview mode.