`` public JsonResult OutBox()
{
//int user_id = Convert.ToInt32(Session["schoolid"]);
int user_id = 44;
var data = db.SMS_Outbox.Where(x => x.schoolid == user_id).OrderByDescending(x => x.id).ToList();
return Json(new { data = data }, JsonRequestBehavior.AllowGet);
}
这是我的Action方法和Ajax调用它将返回此错误 GET http://localhost:54691/SMS/OutBox/OutBox 500(内部服务器错误)
function LoadOutBox() {
debugger;
$.ajax({
url: "../OutBox/OutBox",
async: true,
type: "GET",
success: function (data) {
alert("Success");
},
error: function (data) {
alert("fail");
}
});
}