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
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!