Une seule instance d'un ScriptManager peut être ajouté à la page asp.net

Lorsque j'essaie d'ajouter un contrôle utilisateur, j'ai eu cette erreur

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

Code:

.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisaUserControl.ascx.cs" Inherits="Portal.VisaUserControl" %>
<%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls" TagPrefix="dp" %>
<asp:ScriptManager ID="scriptmanager1" runat="server"></asp:ScriptManager>
<div id="divreg" runat="server">
<table id="tbl" runat="server">
<tr>
<td>
<asp:Label ID="lbl2" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td> Visa Number:</td>
<td><asp:TextBox ID="txtUser" Width="160px" runat="server"/></td>
<td> Country Name:</td>
<td><asp:DropDownList ID="dropCountry" Width="165px" runat="server"></asp:DropDownList></td>
</tr>
<tr>
<td> Type of Visa:</td>
<td><asp:DropDownList ID="dropVisa" Width="165px" runat="server" OnSelectedIndexChanged="dropVisa_SelectedIndexChanged"></asp:DropDownList></td>
<td> Type of Entry:</td>
<td><asp:DropDownList ID="dropEntry" Width="165px" runat="server"></asp:DropDownList></td>
</tr>
<tr>
<td> Expiry Date</td>
<td><asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" 
TargetControlID="txtDate" PopupButtonID="Imgbtnfromdate" Format="dd/MM/yyyy">
</ajaxToolkit:CalendarExtender>
</td>
<td>
<asp:Button ID="btnRemove" Text="Remove" runat="server" OnClick="btnRemove_Click" />
</td>
</tr>
</table>
</div>

.aspx.cs

  protected override void LoadViewState(object savedState)
{
base.LoadViewState(savedState);
GenerateControls();
}
private void GenerateControls()
{
foreach (string i in NoOfControls)
{
VisaUserControl ctrl = (VisaUserControl)Page.LoadControl("VisaUserControl.ascx");
ctrl.ID = i;
this.rpt1.Controls.Add(ctrl);
}
}

Ici, est le problème

    protected void btnAddVisa_Click(object sender, EventArgs e)
{
List<string> temp = null;
var uc = (VisaUserControl)this.LoadControl(@"VisaUserControl.ascx");
string id = Guid.NewGuid().ToString();
uc.ID = id;
temp = NoOfControls;
temp.Add(id);
NoOfControls = temp;
rpt1.Controls.Add(uc);
}

Dans l'image ci-dessous si Cliquer sur le bouton ajouter j'ai eu cette erreur
Une seule instance d'un ScriptManager peut être ajouté à la page asp.net

Des idées? Merci d'avance

Vous avez certainement ajouté un ScriptManager quelque part d'autre dans votre Page.
Dans le contrôle de l'Utilisateur page, j'ai ajouté un seul gestionnaire de script

OriginalL'auteur user2500094 | 2013-09-30