web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Web Form -Script Manager error

(0) ShareShare
ReportReport
Posted on by

Good Day,

Please advise on how to fix this Scriptmanager error '

Only one instance of a ScriptManager can be added to the page.'

I used the template within Visual studio to create ASPNet Web application. On one of the page I replaced the content with 

<asp:ScriptManager runat="server" />
<crm:CrmDataSource ID="Contacts" runat="server" />
<crm:CrmEntityFormView DataSourceID="Contacts" EntityName="contact" SavedQueryName="ContactForm" runat="server" />

.....But I want the contact Form to inherit design from the Master page, so I had a final code like this..........

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CRMAPP._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

   <asp:ScriptManager runat="server" />
<crm:CrmDataSource ID="Contacts" runat="server" />
<crm:CrmEntityFormView DataSourceID="Contacts" EntityName="contact" SavedQueryName="Create Contact Web Form" runat="server" />

</asp:Content>

But I am now getting this error message

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Only one instance of a ScriptManager can be added to the page.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[InvalidOperationException: Only one instance of a ScriptManager can be added to the page.]
   System.Web.UI.ScriptManager.OnInit(EventArgs e) +600
   System.Web.UI.Control.InitRecursive(Control namingContainer) +139
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Samuel,

    Try removing ScriptManager from user control.

    See: stackoverflow.com/.../only-one-instance-of-a-scriptmanager-can-be-added-to-the-page-in-asp-net

    Only one instance of the ScriptManager control can be added to the page. The page can include the control directly, or indirectly inside a nested component such as a user control, content page for a master page, or nested master page. If a page already contains a ScriptManager control, but a nested or parent component needs additional features of the ScriptManager control, the component can include a ScriptManagerProxy control. For example, the ScriptManagerProxy control enables you to add scripts and services that are specific to nested components.

    Hope this helps.

  • Community Member Profile Picture
    on at

    It fixed the issue! Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans