Reputation: 3569
I have an ASP.Net MVC project that is split into 'areas'
On a view in area 'A' I wish to render a partial view via a controller within area 'B'.
I have the following within my View inside area 'A'
Html.RenderAction("Index", "AreaBHome", new { Area="AreaB"});
This doesn't seem to work.
Does anyone know how to do this?
Upvotes: 5
Views: 9834
Reputation:
use this
Html.RenderAction("action", "controller", new { area = "Area", model = ViewData.Model })..
or this
@Html.Partial("~/Views/ControllerName/_PartialView.cshtml", Model)
Upvotes: 6