views:

8310

answers:

3

I wanted to switch to the beta version to see if it fixes a problem I have been having, so I downloaded it and put two dll files into my bin folder. I deleted the old references to these files in visual studio, and re-added them.

When I run my program I get an error:

Microsoft JScript runtime 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 AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.

I can't figure out how to fix this. I have the new System.Web.Ajax.dll added to visual studio, but I can't see any AjaxScriptManager anywhere...

Any ideas?

+4  A: 

Adding the following to the aspx file fixed this error for me:

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
chrsjc
+3  A: 

I had very bad performance issues when trying to use ToolkitScriptManager from ASP.NET Ajax Library Beta 0911 library. The problem was that PreRenderComplete stage took over 0.5s for a simple form. When I switched to AjaxScriptManager (from System.Web.Ajax.dll found in the same Toolkit release), the same application started to work 10 times faster and PreRenderComplete stage now takes 7ms (up to 70 times faster!). So I suggest using AjaxScriptManager instead of ToolkitScriptManager if that doesn't break any functionality of your application.

Alexey Sharayev
Same situation here. AjaxScriptManager performs much better in my experience.
Shelly Skeens
A: 
<ajax:ToolkitScriptManager ID="somename" runat="server" EnablePartialRendering="true" CombineScripts="false"></ajax:ToolkitScriptManager>

Use the above code to turnoff the combinescripts feature of ToolkitScriptManager and you wont get error.

Thanks, SK

Kannan