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

 

 

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

 

posted @ 2014-12-02 16:29  easy5  阅读(1162)  评论(0编辑  收藏  举报