【发布时间】:2020-04-12 21:06:19
【问题描述】:
我正在尝试使用 Ajax 请求上传 Excel 文件。
这是我的代码:
$.ajax({
url: "/Configuration/ImportCPTMappingWithApptType",
type: "POST",
contentType: false,
processData: false,
data: data1,
success: function (Message) {
Console.log(Message);
//$("#Products").html(Message);
},
failure: function (response) {
fnClosePageLoader();
fnErrormsg(response.responseText);
},
error: function (xhr, status, p3, p4) {
var err = "Error " + " " + status + " " + p3 + " " + p4;
if (xhr.responseText && xhr.responseText[0] == "{")
err = JSON.parse(xhr.responseText).Message;
fnErrormsg(err);
alert(err);
return false;
}
});
但它会引发错误 404 Not Found。可能是什么问题?
【问题讨论】:
-
相同的 ajax 与 HttpGet 一起工作正常。
标签: asp.net excel ajax model-view-controller