First we have to create a webapplication and add to it Ajax enabled WCF service. Change default DoWork method to accept parameter
First add on the page input text control and two buttons.
It’s very easy, you have to pass url with method, parameter (value from textbox) specify data type and callback function. Now you can run webapplication, put some text in input box and press button “jQuery call” Calling WCF service with Microsoft Ajax is much more easy. You do not to provide most of the properties like jQuery call.
After pressing button, you will have the same result. All source code can bi found below. I did not change web.config, so you can use default data generated by VisualStudio. ASPX page: