This is a migrated thread and some comments may be shown as answers.

How to use RadAjaxManager with several Contents

7 Answers 130 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Suzi
Top achievements
Rank 1
Suzi asked on 03 Oct 2008, 08:33 AM
I use 2 contents which communicate together : 

<

asp:Content ID="Content1" ContentPlaceHolderID="cl" runat="server">
    // Left Panel
</asp:Content>

<

asp:Content ID="Content2" ContentPlaceHolderID="cb" runat="server">
    // Right Panel
</
asp:Content>

I would like to user RadAjaxPanel or RadAjaxManager. The LeftPanel can refesh the Right Panel, and the Right Panel can refresh the LeftPanel. Is it possible to use the RadAjax with Contents and how ?

Thank you in advance,

7 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 03 Oct 2008, 08:51 AM
Hello Suzi,

If you need the both Contents to update each other, the easiest way is to wrap them with RadAjaxPanel.

Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Suzi
Top achievements
Rank 1
answered on 03 Oct 2008, 09:01 AM
I tried to do it, but i doesn't work. The Left panel doesn't refresh the second one.

<asp:Content ID="Content1" ContentPlaceHolderID="cl" runat

="server">
<telerik:RadAjaxPanel id="RadAjaxPanelLeft" runat="server"EnableAJAX= "True">
  // Left Panel
</telerik:RadAjaxPanel>
</asp:Content>

<
asp:Content ID="Content2" ContentPlaceHolderID="cb" runat="server">
<telerik:RadAjaxPanel id="RadAjaxPanelRight" runat="server"EnableAJAX= "True">
    // Right Panel
</telerik:RadAjaxPanel>
</
asp:Content>

My syntax is it correct ? The Right and Left Panels have UserControls. I only have added two RadAjaxPanels.



Thank you in advance,

0
Maria Ilieva
Telerik team
answered on 06 Oct 2008, 06:17 AM
Hi Suzi,

Both ContentPanels must be in one RadAjaxPanel. Like this:

<telerik:RadAjaxPanel id="RadAjaxPanelLeft" runat="server"EnableAJAX= "True">
<asp:Content ID="Content1" ContentPlaceHolderID="cl" runat="server">
 
 // Left Panel


</asp:Content>

<
asp:Content ID="Content2" ContentPlaceHolderID="cb" runat="server">

    // Right Panel

</
asp:Content>

</telerik:RadAjaxPanel>

Let us know how it goes.


Greetings,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Suzi
Top achievements
Rank 1
answered on 08 Oct 2008, 10:26 AM
It doesn't work. It tells me that the server tag is not well formed.

0
Vlad
Telerik team
answered on 08 Oct 2008, 10:39 AM
Hi Suzi,

There should be a space between runat="server" and EnableAJAX= "True".

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Suzi
Top achievements
Rank 1
answered on 08 Oct 2008, 11:05 AM
Of course, sorry, but now I have this error :

Content controls have to be top-level controls in a content page or a nested master page that references a master page.


0
Accepted
Iana Tsolova
Telerik team
answered on 13 Oct 2008, 08:14 AM
Hi Suzi,

Note that any control in a content page should be inside a Content tag.

In order to achieve your goal I suggest that you use RadAjaxManager in the Master page and remove the RadAjaxPanel from the content page. Your pages can have the following markup for instance:

ContentPage
<asp:Content ID="Content1" ContentPlaceHolderID="LeftPanel" Runat="Server">  
    LeftPanel content here  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="RightPanel" Runat="Server">  
    RightPanel content here  
</asp:Content> 

MasterPage
<form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <div> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="LeftPanel">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="LeftPanel" /> 
                        <telerik:AjaxUpdatedControl ControlID="RightPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RightPanel">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="LeftPanel" /> 
                        <telerik:AjaxUpdatedControl ControlID="RightPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
          
        <asp:ContentPlaceHolder ID="LeftPanel" runat="server">  
        </asp:ContentPlaceHolder> 
        <asp:ContentPlaceHolder ID="RightPanel" runat="server">  
        </asp:ContentPlaceHolder> 
          
    </div> 
</form> 

You can find further information about RadAjaxManager in master/content page scenarios in the following resources:

http://www.telerik.com/help/aspnet-ajax/ajxajaxmasterpage.html
http://www.telerik.com/help/aspnet-ajax/ajxloadcontrolfromanotherwebusercontrolindifferentmasterpagecontentplaceholder.html
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html

Let me know if you need more help.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Suzi
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Suzi
Top achievements
Rank 1
Vlad
Telerik team
Iana Tsolova
Telerik team
Share this question
or