【发布时间】:2013-04-21 22:49:49
【问题描述】:
这是我的 js/ajax 代码:
$.ajax({
type: 'POST',
data: JSON.stringify(jsonObj),
url: 'filter/GetAjaxTestResult',
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (data) {
alert(data);
}
});
我想将json 作为字符串发布。这是我在 mvc/controller 中尝试过的:
[HttpPost]
public JsonResult GetAjaxTestResult(dynamic jsonString)
{
return "";// Here jsonString is null!!!
}
如何将json 设为string?有可能吗?
【问题讨论】:
-
在action方法中获取jsonString的值了吗?
标签: jquery json ajax asp.net-mvc post