+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Only one instance of a ScriptManager can be added to the page error message

Only one instance of a ScriptManager can be added to the page error message

5 posts, 0 answered
  1. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    11 Feb 2013
    Link to this post

    I am using a custom User Control that requires the RadScriptManager control in order to function since it is using numerous RadControls for ASP.NET AJAX.

    I have included the RadScriptManager in the Title & Properties for my Sitefinity Content Page, but this functionality does not seem sufficient to get my controls to render properly.

    When I subsequently add the RadScriptManager directly to my User Control, I get an error message in the Error Log file as well as within my Sitefinity Content Page "Only one instance of a ScriptManager can be added to the page".

    How do I resolve this error message in my Sitefinity Content Page as well as within my error log files and still get the content leveraging the RadControls for ASP.NET AJAX to render properly?

    Please advise since this issue has been plaguing me since Sitefinity v. 4.x.

    Thanks.

  2. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    12 Feb 2013 in reply to Samir Vaidya
    Link to this post

    Error message from error log:

    Timestamp: 2/11/2013 3:38:53 AM

    Message: HandlingInstanceID: 29ecb590-c661-48ac-9c9a-a17eff8a03db
    An exception of type 'System.InvalidOperationException' occurred and was caught.
    --------------------------------------------------------------------------------
    02/10/2013 19:38:53
    Type : System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Only one instance of a ScriptManager can be added to the page.
    Source : System.Web.Extensions
    Help link : 
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void OnInit(System.EventArgs)
    HResult : -2146233079
    Stack Trace :    at System.Web.UI.ScriptManager.OnInit(EventArgs e)
       at Telerik.Web.UI.RadScriptManager.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.AddedControl(Control control, Int32 index)
       at System.Web.UI.ControlCollection.Add(Control child)
       at System.Web.UI.Control.AddParsedSubObject(Object obj)
       at System.Web.UI.Control.System.Web.UI.IParserAccessor.AddParsedSubObject(Object obj)
       at ASP.usercontrols_registration_ucregistrationwizard_ascx.__BuildControlTree(usercontrols_registration_ucregistrationwizard_ascx __ctrl)
       at ASP.usercontrols_registration_ucregistrationwizard_ascx.FrameworkInitialize()
       at System.Web.UI.UserControl.InitializeAsUserControlInternal()
       at System.Web.UI.UserControl.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.AddedControl(Control control, Int32 index)
       at System.Web.UI.ControlCollection.Add(Control child)
       at Telerik.Sitefinity.Web.UI.DesignTimeControl.CreateChildControls()

    Additional Info:

    MachineName : W12
    TimeStamp : 2/11/2013 3:38:53 AM
    FullName : Telerik.Sitefinity.Utilities, Version=5.3.3900.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
    AppDomainName : /LM/W3SVC/23968/ROOT-1-130050260992954110
    ThreadIdentity : trcacademy
    WindowsIdentity : W12\aspnet_23968

  3. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    14 Feb 2013
    Link to this post
    Hello Samir,

    Please check this forum thread for more information:

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/only-one-instance-of-a-scriptmanager-can-be-added-to-the-page 

    All the best,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    10 Feb 2015 in reply to Pavel Benov
    Link to this post
    One of the problems I have with the proposed solution is that it requires a custom Master Page that contains a ScriptManager control on it.  However, I am using a Sitefinity Master Page that I designed directly through the Sitefinity UI.  Therefore, how can I include a ScriptManager control in that Page Template?  Is there a way to accomplish this without writing my own custom Master Page?  That would be ideal.
  5. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    12 Feb 2015
    Link to this post
    Hi Samir,

    One way is to create a custom control on which you can add a script manager and then add this control on the template. This way the script manager will be added on all pages which are based on the template and this way you will not have to create a .master page. 

    Regards,
    Pavel Benov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
5 posts, 0 answered