This is a real beginner question and hopefully you would be able to help me with a quick answer.
When I call my action of type JsonResult the view renders as raw Json and not as the expected defined view that I have created.
This is all that I see in the browser:
[{"Name":"xx","Description":"xx","Address":"xx","Town":"xx","PostCode":"xx","Enabled":true,"pkId":1},{"Name":"xx","Description":"xx","Address":"xx","Town":"xx","PostCode":"xxx","Enabled":true,"pkId":3}]
Here's my action:
public JsonResult SubmitFeedback()
{
PropertyInspectionContext context = new PropertyInspectionContext();
var prop = context.Property;
return Json(prop, JsonRequestBehavior.AllowGet);
}
Thanks,
If you have created JsonResult ( Json) in return so it is return JsonString.
If you want View should be return with Html markup and model combine then you should have to return View Result.