我目前正在尝试从我的控制器加载数据表,并出现此Ajax错误 enter image description here
function InitOverviewDataTable() {
$("#data-table").dataTable().fnDestroy();
$('#data-table').dataTable({
bProcessing: true,
sAjaxSource: '@Url.Action("LoadUser", "Setup")'
});
}
[HttpPost]
public ActionResult LoadUser()
{
var users = db.R_User.ToList()
.Select(a => new
{
employee_number = a.employee_number,
role_id = a.role_id,
active_status = a.active_status
});
return Json(users);
}
先谢谢。