只能将一个ScriptManager实例添加到页面错误中

问题描述 投票:1回答:1

我正在使用asp web表单,我想显示一个模态,我需要用另一个网站数据实现模态。

现在我使用此代码作为弹出窗口打开但我想在同一网站上打开内容。

   <asp:Repeater ID="Resultados" runat="server" >
          <HeaderTemplate>
              <table class="solicitud ">

                  <tr >
                      <th>Agregar OC y SC</th>
                      <th>Factura y guía despacho</th>    

                  </tr>
          </HeaderTemplate>
          <ItemTemplate>
              <tr>
                  <td> 
                      <a onclick="window.open('/TEST/User/SCyOC.aspx?Number=<%# Eval("num_solicitud") %>','targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=300');"><span aria-hidden="true" class="glyphicon glyphicon-upload"></span> SC/OC</a>
                  </td>

                   <td>
                        <a onclick="window.open('/TEST/User/FacturaYDespacho.aspx?Number=<%# Eval("num_solicitud") %>','targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=300');"><span aria-hidden="true" class="glyphicon glyphicon-upload"></span> Agregar datos</a>
                   </td>

              </tr>

          </ItemTemplate>
          <FooterTemplate>
              </table>
          </FooterTemplate>

      </asp:Repeater>

有什么建议吗?

我试图使用AjaxControlToolkit但由于错误我无法使用:

只能将一个ScriptManager实例添加到页面中。

html asp.net webforms
1个回答
0
投票

您的.aspx页面中可能有多个脚本管理器,因此请从.aspx页面中删除那些不必要的脚本管理器。应该只有一个脚本管理器,如ID ScriptManager1

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

只能将一个ScriptManager控件实例添加到页面中。页面可以直接包含控件,也可以间接包含在嵌套组件内,例如用户控件,母版页的内容页面或嵌套母版页。如果页面已包含ScriptManager控件,但嵌套或父组件需要ScriptManager控件的其他功能,则该组件可以包含ScriptManagerProxy控件。例如,ScriptManagerProxy控件使您可以添加特定于嵌套组件的脚本和服务。见msdn

© www.soinside.com 2019 - 2024. All rights reserved.