Problem of RadAjaxManager with DNN

7 posts, 0 answers
  1. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 27 Dec 2007 Link to this post

    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.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 28 Dec 2007 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 06 Jan 2008 Link to this post

    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.
  5. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 06 Jan 2008 Link to this post

    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.
  6. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Jan 2008 Link to this post

    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
  7. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 08 Jan 2008 Link to this post

    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.
  8. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 09 Jan 2008 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017