I am trying to submit this with Ajax to a MVC3 controller:
var params = {
\'productId\': productId,
\'list\': []
};
$.each($(\'.
Try changing your controller action to (I'm assuming here that Specification is a model representing the JSON you're trying to post):
public Boolean Save(Int32 productId, List specifications)
And then change these things in your JS:
var params = {
'productId': productId,
'specifications': []
};
params.specifications.add(specification);
$.ajax({
type: "POST",
url: "/Admin/Product/Save/",
data: JSON.stringify(params),
contentType: 'application/json',
success: function () { alert('done'); }
});