Visual Studio 2005 + AjaxToolkit
I have an ASP.NET W开发者_StackOverfloweb application. I am building it with Visual Studio 2005. One of my user controls requires the AJAX Control Toolkit. For some reason though, my project will not build. However, I have referenced the AjaxControlToolkit assembly. It is appearing in the project references.
Does anyone have any ideas as to why this application will not build?
Thank you!
The UpdatePanel is part of System.Web.Extensions.dll
and does not need to be explicitly added to the bin folder of the project as it gets installed into the GAC (global assembly cache).
See the ASP.NET AJAX documentation for more information. The ASP.NET 2.0 AJAX Extensions 1.0 msi can be downloaded here.
(I'll leave the rest of the answer here as it may prove useful for someone else)
It sounds like the AJAX Control Toolkit is not referenced in the page. Make sure you have
using AjaxControlToolkit;
in the code-behind.
Also, you might want to add this to the web.config
<pages>
<controls>
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>
</controls>
</pages>
This specifies the tag prefix for the AJAX Control Toolkit controls when used in the aspx markup.
As per http://www.ajaxtoolkit.net/ ...
Note: This Septemeber 2009 release: Toolkit version 3.0.30930 is only for users who are building on top of .NET Framework 3.5 using Visual Studio 2008.
If you are using .NET Framework 2.0 and Visual Studio 2005 then you should use the earlier Toolkit version 1.0.20229 at CodePlex.
So unfortunately, if you're still developing in VS2005, you are stuck with a very old and buggy version of the Ajax
For .Net 2.0 (not 3.5!), download it from here.
Please note: If your web app is using a mix of .Net 2 and 3.5 or more, you can theoritically have two (or more) versions of the Ajax installed to cater for more than one .Net framework. But you have to give them separate assemblies. See here and here.
精彩评论