top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to send result back in JSON format in MVC?

0 votes
176 views
How to send result back in JSON format in MVC?
posted Mar 29, 2017 by Jdk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer
public JsonResult getCustomer() {
    Customer obj = new Customer();
    obj.CustomerCode = "1111";
    obj.CustomerName = "Raj";
    return Json(obj, JsonRequestBehavior.AllowGet);
}
answer Mar 30, 2017 by Shivaranjini
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...