Save as json file error in internet explorer

when using asp.net mvc json result return , in internet explorer , save as json file option will come.

this can be resolved by

 
// this was previous
//  return Json(new { sView = msg, IsSuccess = isnsuccs }, JsonRequestBehavior.AllowGet);
// this is chnaged 
                    return Json(new { sView = msg, IsSuccess = isnsuccs }, "text/plain", System.Text.Encoding.UTF8,
                        JsonRequestBehavior.AllowGet);

in json success , have to parse as json .

var nres = $.parseJSON(context);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>