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.
You can use only one
ScriptManagerper pageBut if you need to use the functionality provided by the
ScriptManagerfor example to register custom scripts (this is really useful when you are creating server controls or working with content pages), there is one approach.Use the
<asp:ScriptManagerProxy runat="server" />server control insteadFrom MSDN:
Source
For more info: