Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there, i am developing an asp.net website and i wanted to use ajax controls with it but when i use the 'ScripManager' get the following error message when i debug my application:

ScriptManager throw new 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.");

But when i use the 'ToolkitScriptManager', i get the following error message:

Server Error in '/AjaxControlToolkitSampleSite' Application. -------------------------------------------------------------------------------- Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.TypeLoadException: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [TypeLoadException: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.] AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +0 System.Web.UI.ScriptManager.RegisterScripts() +261 System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +117 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2063008 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2247


How can i go about this problem.

Thanks in advance
Yours faithfully, Martin
Posted

First, are you using the Script Manager from the toolkit, not the one on the Ajax Extensions tab in the toolbox? (It's what the error is telling you).

Second, you've probably downloaded the wrong version of the library. Try this: Ajax Control Toolkit[^] and get: AjaxControlToolkit.Binary.NET4.zip
 
Share this answer
 
Hi,

I think 90% of ur problem is with ur AjaxControlToolKit version u r using.

If u r using VS-2010, then use the " AjaxControlToolkit.Binary.NET4" version of toolkit and it doesnt matter ScriptManager from which u r taking either from "AjaxExtensions" or from "AjaxToolkit".

If u r using VS-2008 then u can use "AjaxControlToolkit 3.0" version.
 
Share this answer
 
check if you are using the correct version of AjaxControlToolkit dll file. make sure that the ajax assembly file information is correct in web.config file or try manually entering the register ajaxcontroltool kit directive and adding the control to aspx page.
 
Share this answer
 

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