1

我在Visual Studio 2012上。我需要爲我的網站添加CollapsablePanelExtender。因爲MasterPage上有一個ScriptManager,所以我無法弄清楚如何在ToolkitScriptManager中添加。當我嘗試使用Scriptmanagerproxy時,web.config崩潰並告訴我必須使用ToolkitScriptManager。當我用我的toolkitscriptmanager與母版頁的ScriptManager的,該網站還死機,並說ToolkitScriptManager無法找到,而「ScripManager只有一個實例被允許只有一個ScriptManager實例可以添加到頁面:問題與Ajax Toolkit?

我對母版下面的代碼:

<asp:ScriptManager runat="server"> 
    <Scripts> 
     <%--Framework Scripts--%> 
     <asp:ScriptReference Name="MsAjaxBundle" /> 
     <asp:ScriptReference Name="jquery" /> 
     <asp:ScriptReference Name="jquery.ui.combined" /> 
     <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" /> 
     <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" /> 
     <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" /> 
     <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" /> 
     <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" /> 
     <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" /> 
     <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" /> 
     <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" /> 
     <asp:ScriptReference Name="WebFormsBundle" /> 
     <%--Site Scripts--%> 

    </Scripts> 
</asp:ScriptManager> 

,我必須在實際的頁面中使用下面的代碼。

<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"></asp:ToolkitScriptManager> 
<h3>We suggest the following:</h3> 
<ol class="round"> 
    <li class="one"> 
     <asp:Panel ID="pnlRec" runat="server"><h5>Getting Started with Recreation</h5><br /> 
      <asp:Label ID="lblMsg" runat="server" Text="Label"></asp:Label></asp:Panel> 
     <asp:Panel ID="cpnlRec" runat="server"><table><tr> 
       <td>Stuff</td><td>Stuff</td><td>Stuff</td> 
        </tr></table></asp:Panel> 
     <asp:CollapsiblePanelExtender ID="cpeRec" runat="server" CollapseControlID="pnlClick" Collapsed="True" ExpandControlID="pnlClick" CollapsedText="Show" ExpandedText="Hide" TextLabelID="lblMsg" TargetControlID="cpnlRec"> 

     </asp:CollapsiblePanelExtender> 

回答

0

檢查Designer.cs文件,並確認你沒有任何其他的參考toolkitscriptmanager。如果發現刪除這些引用。清潔它和bui就這樣。這可能是錯誤的原因。

相關問題