Probably this has been asked so many times before but i can't find answer any where.
I have a Action
public ActionResult SearchResult()
{
return View();
}
Now i need some data as well which is related to View, so i am trying to do following
public JsonResult SearchResult()
{
var result = new JsonResult();
result.Data = new { Data = x, Html = "Here i need html generated from view" }
return result;
}
How can i get html generated from my view? i can also convert it to control if required.