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

Use your Android as a Genie garage door opener remote

Personal tools
Namespaces
Variants
Views
Actions
Navigation