簡體   English   中英

只能將ScriptManager的一個實例添加到頁面錯誤中

[英]Only one instance of a ScriptManager can be added to the page error

我正在使用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的一個實例添加到頁面中。

你可能在你的多個腳本經理.aspx頁面,以便您刪除那些不必要的腳本管理.aspx頁面。 應該只有一個腳本管理器,例如ID ScriptManager1

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

只能將ScriptManager控件的一個實例添加到頁面中。 該頁面可以直接或間接在嵌套組件(例如用戶控件),主頁面的內容頁面或嵌套主頁面內部包含控件。 如果頁面已經包含ScriptManager控件,但是嵌套或父組件需要ScriptManager控件的其他功能,則該組件可以包含ScriptManagerProxy控件。 例如,通過ScriptManagerProxy控件,您可以添加特定於嵌套組件的腳本和服務。 參見msdn

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM