MVC中的Controller中返回一个JsonResult在弹出一个下载框?
时间:2014-12-02 17:14:04
收藏:0
阅读:273
public JsonResult ReturnTest() { return Json(new {myMsg ="hello world"}, "text/html; charset=UTF-8"); //没问题 //return Json(new { myMsg = "hello world" }, "text/json; charset=UTF-8"); //firefox下JSON提示另存为 //return Json(new { myMsg = "hello world" }); //IE下JSON提示另存为 }
原文:http://www.cnblogs.com/easy5weikai/p/4137832.html
评论(0)