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

Problem of RadAjaxManager with DNN

6 Answers 185 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ricky
Top achievements
Rank 1
Ricky asked on 27 Dec 2007, 08:20 AM
Hi, I know that if two or above RadAjaxManagers on the same page, the error will occur: 
Only one instance of a RadAjaxManager can be added to the page!

But how could I put a RadAjaxManager on the dynamically generated page, and let modules share the singlton instance?

Thanks,
Ricky.

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 Dec 2007, 12:56 PM
Hello Ricky,

Can you clarify your exact scenario? If the AjaxManager is on the main page, you can reference the other controls, by locating them with FindControl, or even use a separate RadAjaxManager for each module. As long as the managers do not interact with each other, there is no possibility for invalid ViewState.

All the best,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ricky
Top achievements
Rank 1
answered on 07 Jan 2008, 03:28 AM
I have a .ascx where there is a RadAjaxManager, and I implement another .ascx (module in DNN) to use RadDock to load this .ascx. The aforementioned error appears when  the second RadDock are added into a the module containing RadDock.

Thanks,
Ricky.
0
Ricky
Top achievements
Rank 1
answered on 07 Jan 2008, 05:55 AM
Hi,
I study your document and find one possible solution: put only one RadAjaxManager on the Master Page and put multiple RadAjaxManager Proxy on the content page.
But under DNN platform, there is no Master Page we can create. So how could I implement it on DNN without modifying the DNN's source code?

Thanks,
Ricky.
0
Steve
Telerik team
answered on 08 Jan 2008, 03:32 PM
Hi Ricky,

You should put the RadAjaxManager control where the RadDockManager is. Then you can have the RadAjaxManagerProxies added in the modules you load. The approach is the same as the MS AJAX one - single ScriptManager and ScriptManagerProxy for the modules.

Regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ricky
Top achievements
Rank 1
answered on 09 Jan 2008, 12:37 AM
I got another problem: multiple DNN's module instances can be placed with the same page. I still need a workaround that let me put a RadAjaxManager onto the Page, shared by modules on it!

Thanks,
Ricky.
0
Steve
Telerik team
answered on 09 Jan 2008, 02:07 PM
Hello Ricky,

Well in this case you would have to do everything dynamically in code behind. Basically make a check if RadAjaxManager already exists and if this is the case do not add a second one. Here is a sample check:

public static RadAjaxManager GetCurrent(Page page)
{
    if (page == null)
    {
        throw new ArgumentNullException("page");
    }
    return (page.Items[typeof(RadAjaxManager)] as RadAjaxManager);
}

Hope this helps.

Regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Ricky
Top achievements
Rank 1
Answers by
Steve
Telerik team
Ricky
Top achievements
Rank 1
Share this question
or