I'm a little unsure when to use Html.RenderAction()to render my views and when not to. I understand that since it is not an “official” component of ASP.NET MVC, its bad practice uses it, and its original intention was to use multiple widgets that do not exist in any specific controller context.
The fact is that RenderAction is very useful when I need a component that exists under a different controller than the one that I am currently viewing for presentation. I believe this is a very neat and autonomous way to render components that rely on data not available in the current view. My View does not need to supply a model, as if I usedRenderPartial()
Is this a bad practice? Is there a better way?
source
share