How to call WCF services from JavaScript jQuery and ASP.NET AJAX

First we have to create a webapplication and add to it Ajax enabled WCF service.

Change default DoWork method to accept parameter

[OperationContract]
public string DoWork(string userName)
{
[...]

Intellisense for jQuery in Visual Studio 2008

Now Visual studio has Intellisense for jQuery. To enable Intellisense just add reference to the file jquery-1.2.6-vsdoc.js

You can get this file here

http://docs.jquery.com/Downloading_jQuery

Scroll down to the link to file like on screenshot below.