How to convert a string to a JSON as the return result for a .NET ActionResult

Jump to: navigation, search

public ActionResult fnExample() { string json = "OK"; return Json(new ContentResult { Content = json, ContentType = "application/json" }, JsonRequestBehavior.AllowGet); }

See also

Personal tools
Namespaces
Variants
Views
Actions
Navigation