Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
We are Deploying the .net User Controls in Share point 2010 and we are using Ajax in the UserControls(Tool Script Manager and Calender Extender Control and also ScriptManager Proxy). But we are getting the Error: like only one Instance of Script Manager is required. When we are commenting the Tool Script Manager the Page is Working but we are not getting the Calendar Extender Control and the ajax is not working and

It is Showing the Following Error:

AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.
Posted

Sounds like you have ASP.NET Script Manager present on your page and then you are also trying to add ToolkitScriptManager.

Remove the ASP.NET ScriptManager and just keep something like this:
XML
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>


Only one script manager is allowed, and since you are working with higher version of controls, you would need to have ToolkitScriptManager and not ASP.NET ScriptManager.
This[^] looks good, have a read.
 
Share this answer
 
v2
Comments
[no name] 6-Jan-11 11:50am    
Keeping mind this SharePoint and all components such as this should be added to the MasterPage not to the UserControls to prevent conflicts from other controls written by other developers and vendors
Sandeep Mewara 6-Jan-11 11:51am    
Agreed with Mark.
NewtoSharepoint 6-Jan-11 11:57am    
But here we are only deploying the UserControls not the aspx and Master pages.
You need to ensure the proper JavaScript files have been added to the masterpage or imported by the webpart. The ScriptManager is added on the Master page to ensure only one is present and it can be used by any page using the Master Page.
 
Share this answer
 
Comments
NewtoSharepoint 6-Jan-11 11:59am    
Here we are using Only the User Controls to Deploy..
[no name] 6-Jan-11 13:14pm    
SharePoint is a share environment where webparts can and are written by many different developers from many different vendors. You MUST take this into account when developing for it. What you do in your controls MUST NOT affect others. With components such as ScriptManager it is expected that it has been added to the MasterPage for the site, as is the case for the default implementations. In your control, if you require a ScriptManager, you can check for its presence and add one from the code-behind if not found, but you SHOULD NOT add it to the markup directly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900