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