ASP.net AJAX in .net 2.0
Introduction
Requirements
- Visual Studio 2005 or higher.
- ASP.net AJAX Extensions installed on the development machine. http://www.asp.net/ajax/downloads/
- The host server must have at least .net 2.0.
STEP 1 – Add AJAX Extensions to project
- Create a new or open an existing website in Visual Studio.
- Create a bin folder in the root of the project.
- Copy the following files from C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 , into the bin folder of your website:
- System.Web.Extensions.dll
- AJAXExtensionsToolbox.dll
- System.Web.Extensions.Design.dll
(note – The location of the AJAX dlls may be in a different folder depending on your system setup. If you cant find them, then reinstall the extensions on to your machine.)
STEP 2 – Configure web.config
Assemblies Section
<system.web> <compilation> <assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </assemblies> </compilation> </system.web>
Pages Section
<system.web> <Pages> <Control> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <Control> <Pages> <system.web>
HttpHandlers
<system.web> <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/s> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> </httpHandlers> </system.web>
System.WebServer
<system.webServer>
<modules>
<add name=“ScriptModule” preCondition=“integratedMode” type=“System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35“/>
</modules>
<handlers>
<remove name=“WebServiceHandlerFactory-Integrated“/>
<add name=“ScriptHandlerFactory” verb=“*” path=“*.asmx” preCondition=“integratedMode” type=“System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35“/>
<add name=“ScriptHandlerFactoryAppServices” verb=“*” path=“*_AppService.axd” preCondition=“integratedMode” type=“System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35“/>
<add name=“ScriptResource” preCondition=“integratedMode” verb=“GET,HEAD” path=“ScriptResource.axd” type=“System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35“/>
</handlers>
</system.webServer>
Conclusion
Your website should be now ASP.net AJAX ready.

2 Trackbacks
[...] STEP 1 – ASP.net AJAX Extensions Before you can add the AJAX Control Toolkit to your site, you need to set it up to work with ASP.net AJAX. A guide to do this in .net 2.0 can be seen in the previous tutorial. http://www.aaronblake.co.uk/blog/2009/05/14/aspnet-ajax-in-net-20/ [...]
[...] STEP 1 – ASP.net AJAX Extensions Before you can add the AJAX Control Toolkit to your site, you need to set it up to work with ASP.net AJAX. A guide to do this in .net 2.0 can be seen in the previous tutorial. http://www.aaronblake.co.uk/blog/2009/05/14/aspnet-ajax-in-net-20/ [...]