Here is the Javascript code
$("#JSONPost").click(function (e) {
var jsonData = { name: "ramesh", mobile: "9xxxxxxxxx" };
$.post(
"/Trace/JSONPostMethod",
jsonData,
function (data, status) {
alert(status);
});
});
});
public ActionResult JSONPostMethod(object data)
{
}
data is coming as {} instead of the { name: "ramesh", mobile: "9xxxxxxxxx" }
Any idea how to get this JSON? I don't want to create a model class to get the data.