麻烦使用.net ScriptManager for Ajax

时间:2011-02-09 14:58:03

标签: asp.net ajax

我正在尝试在.net Visual Web Developer 2010中使用ScriptManager,但每次运行网站时都会出现错误消息:

Could not load file or assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. O sistema não pode encontrar o arquivo especificado. (System couldn't find the specifyed file). Line 7:  </asp:Content> 

Line 8: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 
Line 9:      <asp:ScriptManager ID="ScriptManager1" runat="server"/> 
Line 10:     <div> Line 11:     <ajaxToolkit:Accordion ID="Accordion1" selectedindex = "0" 
runat="server" HeaderCssClass="accordionHeader" hHeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent" AutoSize="None" FadeTransitions="true" TransitionDuration="250" FramesPerSecond="40" RequireOpenedPane="false" SuppressHeaderPostbacks="true">

我已经安装了MS-F#工具,期待FSharp.Core文件将被复制并解决问题,但没有任何改变。

感谢。

1 个答案:

答案 0 :(得分:2)

您无法在MasterPage的ContentPage中注册ScriptManager。您应该在MasterPage中注册它,并在Contentpages中使用ScriptManagerproxy

<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>