Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [OperationContract]
- [WebInvoke(Method = "POST", UriTemplate = "/SavePreferences", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
- public bool SavePreferences(EmployeeRecord info)
- {
- //Do stuff
- return success;
- }
- var data = {
- info: {
- //Define the object properties
- }
- };
- $.ajax({
- type: "POST",
- url: "Service.svc/SavePreferences",
- contentType: "application/json",
- dataType: "json",
- data: JSON.stringify(data),
- processData: false,
- error: function (m) {
- alert(JSON.stringify(m, null, 2));
- },
- success: function (m) {
- alert(m.d);
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement