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

Where should I place the RadAjaxManager ?

2 Answers 73 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
STEVEN
Top achievements
Rank 1
STEVEN asked on 17 Jul 2011, 04:00 PM
Hi,

I got this error because I have RadAjaxManager in both the Site.Master and the Default.aspx page.
[InvalidOperationException: Only one instance of a RadAjaxManager can be added to the page!]

My question is where is the best place to place the RadAjaxManager if I need to ajaxify controls in both Site.Master and Default.aspx?


The 2nd question is how do I display a spinning flower/circle/icon when the control is loading?

2 Answers, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 18 Jul 2011, 01:40 PM
Hi Steven,

Thank you for contacting us.

A suggested practice is to put the RadAjaxManager on the MasterPage and have a RadAjaxManagerProxy on the child pages that inherit from the MasterPage.

In order to display a loading panel over some panel when you click a button you can make the following declaration on the child pages.
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1"
                    LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
<asp:Panel ID="Panel1" runat="server" Width="150px" Height="100px">
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</asp:Panel>

And in the button click event you can have:
protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = DateTime.Now.ToString();
    }


Hope this helps.

Kind regards,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
STEVEN
Top achievements
Rank 1
answered on 02 Aug 2011, 10:29 AM
Thanks my doubts are cleared
Tags
Ajax
Asked by
STEVEN
Top achievements
Rank 1
Answers by
Genti
Telerik team
STEVEN
Top achievements
Rank 1
Share this question
or