In this Demo, we see how to call a Wcf Service Method from JQuery. We make POST and GET Request for the same Service.
We have a ASP.Net MVC Webform, it only consists of html Controls. We have a simple Registration form, which takes User Name and User Email. Once We client the Submit Hyperlink, JQuery will make a POST request to the WCF Service, which will add the data to our Users List.
To retrieve the data, we have a simple Html Text Input, in which we fill the User Name. Once we give the input and click Retrieve Link, JQuery makes a GET Request to WCF Service, which searches the List of users and send back the Data to browser. We Display result in the Div tag.