Created
January 20, 2017 07:26
-
-
Save oclockvn/64fe06843c431d7dcf9013a1db28f065 to your computer and use it in GitHub Desktop.
.net mvc json result with anonymous type c#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult JsonResponse() | |
{ | |
var resp = new { | |
code = 1, | |
msg = "success", | |
data = new List<int>{1, 2, 3} | |
}; | |
return Json(resp, AjaxRequestBehavior.AllowGet); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment