­
ASP.NET MVC

JSONResult Return Null Value Interpreted As Error in MVC 5

18:09
In my recent upgrade from MVC 3 to MVC 5, I encountered another issue/bug in system which JSONResult return null is working properly in MVC3 became an error in MVC5. So, the code below, return Json(null, JsonRequestBehavior.AllowGet); should be changed to, return Json(string.Empty, JsonRequestBehavior.AllowGet); It should return empty string to avoid being recognized as error. Cheers! In my recent upgrade from MVC 3 to...

Read More...