日期:2014-05-16 浏览次数:20458 次
//......
$.post('@Url.Action("s","down")', auction);
window.location.href = '../down/Excel';
//接收
[HttpPost]
public ActionResult s(Down auction)
{
Down md = auction;
//session传数据
System.Web.HttpContext.Current.Session["Station"] = md.station;
//这句是不是没什么用?
return RedirectToAction("excel", "down");
}
[WebMethod]
[Authorize]
public FileStreamResult Excel()
{
//接收session
//生成文件代码....
return File(ms, "application/ms-excel", filename);
}