在主页上添加脚本管理器后,--只能将ScriptManager的一个实例添加到该页面. [英] after adding script manager on master page getting -Only one instance of a ScriptManager can be added to the page.
问题描述
我在我的项目中使用ajax工具包.我的项目有一个母版页,我正在Web页中继承此母版页.我在每个页面上都使用脚本管理器,但现在要求也要在母版页上显示一个实时时钟.我已经使用Timer编写了代码在母版页上显示实时时钟,但出现错误仅ScriptManager的一个实例可以添加到页上.".
如何解决此问题,因为我不想从网页中删除脚本管理器. .
<![CDATA[<% @Page Language="C#" MasterPageFile="~/user_master.master" AutoEventWireup="true" CodeFile="xx.aspx.cs" Inherits="xx_xx" Title="xx" EnableEventValidation="false" %>]]>
仅保留母版页中的脚本管理器,然后从内容页中删除...
I am using ajax toolkit in my project. My project is having a master page and i am inheriting this master page in my web pages.I am using Script manager on every page but now requirement came to display a real time clock also on the master page.I had written the code using Timer to display real time clock on master page but i am getting error "Only one instance of a ScriptManager can be added to the page. ".
How to fix this problem as i don''t want to remove script manager from the webpages.
Try to Add EventValidation="False" to Top of Inherited Page.
<![CDATA[<% @Page Language="C#" MasterPageFile="~/user_master.master" AutoEventWireup="true" CodeFile="xx.aspx.cs" Inherits="xx_xx" Title="xx" EnableEventValidation="false" %>]]>
keep only scriptmanager in masterpage.. and remove from content page...
这篇关于在主页上添加脚本管理器后,--只能将ScriptManager的一个实例添加到该页面.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!