MVC3(.cshtml 文件)
$.getJSON(URL, Data, function (data) {
document.getElementById('divDisplayMap').innerHTML = data;
if (data != null) {
$('#myTablesId').show();
tdOnclickEvent();
}
else {
$('#myTablesId').hide();
}
}).error(function (xhr, ajaxOptions, thrownError) { debugger; });
在服务器端
public JsonResult ZoneType_SelectedState(int x_Id, int y_Id)
{
JsonResult result = new JsonResult();
result.Data = "LongString";//Longstring with the length mention below
return Json(result.Data,"application/json", JsonRequestBehavior.AllowGet);
}
从服务器端,我传递长度为 1194812 的字符串,不止于此。但我收到错误消息
"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."
请帮我解决 ASP