1.

How To Return The Json From Action Method In Asp.net Mvc?

Answer»

Below is the code snippet to return string from ACTION METHOD :

PUBLIC ActionResult TestAction() {

return JSON(new { prop1 = "Test1", PROP2 = "Test2" });

}

Below is the code snippet to return string from action method :

public ActionResult TestAction() {

return JSON(new { prop1 = "Test1", prop2 = "Test2" });

}



Discussion

No Comment Found