首页 > Web开发 > 详细

MVC中的Controller中返回一个JsonResult在弹出一个下载框?

时间:2014-12-02 17:14:04      阅读:272      评论:0      收藏:0      [点我收藏+]

 

 

        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提示另存为
        }

 

MVC中的Controller中返回一个JsonResult在弹出一个下载框?

原文:http://www.cnblogs.com/easy5weikai/p/4137832.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!