top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to send result back in JSON format in MVC?

0 votes
405 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
...