none
ScriptManager RRS feed

  • Pergunta

  • Estou com esse seguinte error...

    Server Error in '/' Application.

    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) +2560883
       System.Web.UI.Control.InitRecursive(Control namingContainer) +140
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311

    Com o codigo...

    <%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="SelecionarModelo.aspx.cs" Inherits="sisGDPB.WebApplication.Acesso.SelecionarModelo" %>
    
    <%@ Register TagName="ModeloGas" TagPrefix="uc" Src="~/Modelo/ModeloGas.ascx" %>
    <%@ Register TagName="ModeloAguaEsgoto" TagPrefix="uc" Src="~/Modelo/ModeloAguaEsgoto.ascx" %>
    <%@ Register TagName="ModeloEdificacao" TagPrefix="uc" Src="~/Modelo/ModeloEdificacao.ascx" %>
    <%@ Register TagName="ModeloBarragem" TagPrefix="uc" Src="~/Modelo/ModeloBarragem.ascx" %>
    <%@ Register TagName="ModeloEstrada" TagPrefix="uc" Src="~/Modelo/ModeloEstrada.ascx" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content>
    
    <asp:Content ID="ContentDrop" ContentPlaceHolderID="MainContent" runat="server">
       
        <div id="drop" >
        
    
        <asp:Panel ID="panelDrop" runat="server" Height="95px" Width="750px">
           
            <asp:Table ID="Table1"  BorderColor="ControlDark" BorderStyle="Double" runat="server" Width="700px" Height="82px">
                <asp:TableRow>
                    <asp:TableCell><asp:Label ID="modelo" runat="server">Selecione o modelo:</asp:Label></asp:TableCell>
                    <asp:TableCell>
                    <asp:DropDownList ID="DropDownModelo" AutoPostBack="true" runat="server" AppendDataBoundItems="True" OnSelectedIndexChanged="DropDowModelo_OnSelectedIndexChanged">
                        <asp:ListItem Value="1">Declaração de projeto básico modelo gás</asp:ListItem>
                        <asp:ListItem Value="3">Declaração de projeto básico modelo água e esgoto</asp:ListItem>
                        <asp:ListItem Value="4">Declaração de projeto básico modelo edificações</asp:ListItem>
                        <asp:ListItem Value="5">Declaração de projeto básico modelo barragens</asp:ListItem>
                        <asp:ListItem Value="2">Declaração de projeto básico modelo estradas</asp:ListItem>
                                        
                        
                    </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>    
        </asp:Panel>
    
        <asp:MultiView runat="server" ID="MultiViewModelo">
            <asp:View runat="server" ID="ViewModeloGas"><uc:ModeloGas runat="server" ID="ModeloGas" /></asp:View>
            <asp:View runat="server" ID="ViewModeloAguaEsgoto"><uc:ModeloAguaEsgoto runat="server" ID="ModeloAguaEsgoto" /></asp:View>
            <asp:View runat="server" ID="ViewEdificacao"><uc:ModeloEdificacao runat="server" ID="ModeloEdificacao" /></asp:View>
            <asp:View runat="server" ID="ViewBarragem"><uc:ModeloBarragem runat="server" ID="ModeloBarragem" /></asp:View>
            <asp:View runat="server" ID="ViewEstrada"><uc:ModeloEstrada runat="server" ID="ModeloEstrada" /></asp:View>
        </asp:MultiView>
    
    
            
    
        </div>
    </asp:Content>
    

    Essa pagina estava funcionando normalmente , do nada comecou a aparecer esse error, tentei inserir o asp:script manager, mais deu outros erros alguem sabe o pq do nada parou, ou o local exato que tenho que inserir o asp:scriptmanager 

    desde já obrigado;


    Att Henrique Neto

    terça-feira, 2 de abril de 2013 22:20

Respostas

Todas as Respostas