【发布时间】:2012-11-08 10:20:12
【问题描述】:
这是网络方法定义:
[HttpPost]
public FileResult GenerateReport(string Id) {
//............Code .................//
return File(response.ReportContents, "application/pdf");
}
这是我对 Web 方法的 jQuery ajax 调用:
$(".ValuationReport").bind('click', function () {
$.ajax({
url: "https://localhost.com/Report/GenerateReport
type: "POST",
data: { Id: "00AFCA2F-6809-4FF4-BA32-125EAEBB1321" },
success: function (data) {
},
error: function () {
alert("error");
}
});
});
请帮帮我。
【问题讨论】:
-
你有没有试过,请显示代码。
-
帮你什么?你还没有真正问过问题(标题不够)。请更清楚地解释您想要做什么,以及为什么您引用的代码不这样做。
标签: javascript jquery ajax asp.net-mvc-3 fileresult