Jquery Ajax with WebMatrix
So using this:
- $.post("Service", { param : "value"}, function (data) {
- alert(data);
- });
I am able to pull out the values just fine using Request["param"].
Now if I'm using :
- $.ajax({
- type: "POST"
- url : "Service",
- data : ({ param : "value" }),
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: function(data) {
- alert(data);
- }
- });
I am not able to find the values in Request,Request.Form, Request.Params or anywhere.
Is there a Difference I'm missing in the two ways to do this. I though $.post was just shorthand for $.ajax.