RadControls for ASP.NET AJAX

Manager vs. Panel Send comments on this topic.
Controls > RadAjax > Manager vs. Panel

Glossary Item Box

When should I use the Panel and when the Manager?

Both RadAjaxManager and RadAjaxPanel are controls that ajaxify other controls. However there are some differences and specifics with these two controls that make them suitable or not for a specific scenario.

Having these two controls in hand gives you a great flexibility in AJAX-enabling web pages.

When to use RadAjaxPanel

RadAjaxPanel is a lightweight control that lets you update a part of your web page with AJAX while keeping the rest of the page working with postbacks.

AJAX Panel is more suitable for cases when you need to update a group of neighboring controls at once. You have to wrap the controls that should be ajaxified in the AJAX Panel. Only controls that are inside the Panel will be updated via AJAX. You cannot set the Panel to update external controls on the page.

When a control (inside the Panel) tries to postback, it will make an AJAX request and all controls in the Panel will be updated.

When to use RadAjaxManager

AJAX Manager offers a complete solution for turning a postback-based application into an AJAX-driven one.

RadAjaxManager control is mostly dedicated to complex scenarios. With AJAX Manager you have many AJAX initiator controls that update different non-adjacent controls.  This is the major difference with AJAX Panel, which updates only itself (and controls that it holds).

Sample Scenario

On the screenshot below there is a sample HelpDesk application. As you can see there three panes there. Clicking in pane 1 updates 2 and 3 and clicking in pane 2 updates pane 3. The possible approaches are described below the image

Manager vs. Panel

First Approach

You can put the whole application in AJAX Panel. Then clicking in either pane 1 or pane 2 will update the three panes altogether using AJAX request.

Although easiest, this is not the optimal scenario for this case.

Second Approach

 You can place pane 2 and pane 3 in AJAX Panel. Then when the user clicks in pane 2, it will update pane 2 and pane 3 with AJAX request. In this scenario you need to have pane 1 making external calls to AjaxRequest() function of the AJAX Panel holding panes 2 and 3.

This is the most complicated and yet not optimal approach. It shows that although panes 2 and 3 are neighboring, it is not suitable to place them in a panel.

Third Approach

In this case you can use AJAX Manager to make the treeview in pane 1 update the grid in pane 2. Then you need to make the gird in pane 2 update the panel in pane 3.