【发布时间】:2020-01-27 15:08:17
【问题描述】:
我需要发送 id 我的加载页面,我如何发送 id 并加载另一个页面?
我的错误:未捕获的 SyntaxError:意外的字符串 我现在这个错误语法错误,但我什么都试过了,我是 ajax 和 mvc 的新手
这是我的代码:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url : "http://localhost:9000/api/Customer/CustomerList",
success: function (data) {
$("#customerList").DataTable({
pageLength:50,
destroy: true,
"data": data,
"columns": [
{ "data": "CustID"},
{
"data": function send(data) {
return "@using (Html.BeginForm("CustomerList", "Customers", FormMethod.Post, new { target = "_blank" })) {<input type='submit' value=" + data.custID + " />}";
}
}
]
});
},
error: function (data) {
alert("CustomerList");
}
});
【问题讨论】:
标签: c# ajax asp.net-mvc