只有一个ScriptManager的一个实例可以被添加到所述页面 [英] Only one instance of a ScriptManager can be added to the page
问题描述
我有一个ASP的UpdatePanel更新后就正常了一个gridview,现在我想在那里也使用了AjaxControlToolkit中一些控制,但接线好一切后,当我跑我得到一个错误
I had an ASP UpdatePanel to update a gridview which worked fine, now I wanted to also use AjaxControlToolkit for some of the controls in there, but after wiring up everything when I run I get an error
"Only one instance of a ScriptManager can be added to the page."
那我评论过的ASP的ScriptManager和现在用的toolkitscriptmanager事实inspite。但是请注意,我仍然使用ASP的UpdatePanel。
inspite of the fact that I commented off the ASP ScriptManager and am using the toolkitscriptmanager. however please note that I am still using the ASP UpdatePanels.
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<!-- <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>-->
任何想法,什么可能是错误怎么回事?
Any ideas as to what might be going wrong here?
推荐答案
您正在使用HTML注释来隐藏一个ASP.NET服务器标签。使用服务器注释,而不是:
You're using an HTML comment to hide an ASP.NET server tag. Use a server comment instead:
<%-- <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager> --%>
ASP.NET会忽略HTML注释,就像它忽略了所有的标签,而不对他们,或者一个=服务器不以&LT;%
这篇关于只有一个ScriptManager的一个实例可以被添加到所述页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!