How can I return HTML in 2 or more JSON fields like this?
return Json(
new
{
Breadcrumbs = PartialView("Breadcrumbs/Breadcrumbs", model.Breadcrumbs),
FolderDetail = PartialView("Detail/Folder", model.FolderDetail)
});
In this case I don’t get HTML, but JSON objects, in result.BreadCrumbs and result.FolderDetail
PartialView is an ActionResult that tells the system to render the partial view rather than the output HTML. Here’s the code I’m currently using to render views to a string before adding it to a JSON result: