asp.net-mvchtml.renderpartial

ASP.NET MVC - Can a Partial View have a controller?


When I'm in a View and I call @Html.RenderPartial("MyPartialView", MyObject) Can I set it up so that this partial view has a controller which is called when RenderPartial gets called?


Solution

  • Probably it will be better to use the RenderAction instead of the RenderPartial