I created a partial view, abc in my Views/Home
added this to my controller
[HttpGet]
public ActionResult abc()
{
return View();
}
and I call the partial view like this
@Html.Partial("~/Views/Home/abc.cshtml")
I’m able to see the partial view but the controller method does not get called. How can I render a partial view and call the controller get method?
I think you are looking for the Html.Action method (on MSDN):
View:
Controller: