[HttpPost]
public ActionResult accountchange(int id, int accountid, bool activate)
{
// Operations
return Json(new { Model = model, Result = true, Message = "Changed Successfully });
}
$('#accountchange-button').click(function () {
alert("");
$.post("url/accountchange/", {id:1, accountid:1, activate:1},
function (data) { $('.result').html(data); }, "json");
});
总是得到:
POST http://localhost/account/accountchange/ 500 (Internal Server Error)
f.support.ajax.f.ajaxTransport.sendjquery.min.js:4
f.extend.ajaxjquery.min.js:4
f.each.f.(anonymous function)jquery.min.js:4
(anonymous function)demo:105
f.event.dispatchjquery.min.js:3
f.event.add.h.handle.i
任何的想法?