ADO.NET Data Services AJAX Client Library in VS2008 SP1 Release
In a previous post
I showed how to
build an Ajax client
for a data service.
In that post I added to
the solution a new
ASP.NET 3.5 Extensions Web Application project which came with the the
ASP.NET 3.5 Extensions preview. In that preview the ADO.NET data
services Ajax client library was embedded in the System.Web.Extensions
assembly. In the release of VS2008 SP1 the ADO.NET data services Ajax client
library is no longer a part of the System.Web.Extensions assembly.
The First Solution – ADO.NET Data Services AJAX Client Library
If you want to use the Ajax functionality without the need to use the
ASP.NET 3.5 Extensions Web Application template you can download the
library from here. The download contains two js files – DataService.js and
DataService.debug.js. After you downloaded and extracted the files you
can include them in every web application that you build.
Put the files in Scripts directory (or where ever you prefer to put it)
in your project and then register the script reference in the ScriptManager
After you registered the js file script reference you’ll be able to use it in
your client scripts.
Another Solution to the Problem
Another way to solve the problem is to use the System.Web.Extensions
assembly that came with the ASP.NET 3.5 Extensions preview. First you’ll
need to replace the System.Web.Extensions (version 3.5) that your project
reference with the System.Web.Extensions (version 3.6) that is located in
the following path:
C:\Program Files\Reference Assemblies\Microsoft\Framework\ASP.NET 3.5 Extensions.
After the replacement, you should go to the web.config file and replace the version
of System.Web.Extensions to 18.104.22.168 instead of 22.214.171.124. Doing so will enable every
web application to use the ADO.NET data services Ajax client library as I wrote in
the previous post.
I gave two ways to solve the problem of adding
ADO.NET data services Ajax client library to your project.
I tested the ways that I suggested and both of them are working well. If you ask me,
I recommend the first solution but you can choose from both of them.
You can use the first and then you’ll have to update the js files every time a new
version will appear in codeplex. You can use the second and you will be bound to the
System.Web.Extensions (version 3.6) assembly that is currently a part of the
ASP.NET 3.5 Extensions preview and not a part of the new SP1 release. The choice