I must be missing something obvious. I have a view A in controller B that needs to call and render an action method Y in controller Z.
Should I be doing something like this in view A ? I’m getting errors in VS about how it can’t resolve action ‘/Z/Y’
@Html.RenderAction("/Z/Y", new ModelUsedInActionMethodY())
You need to use:
This will route to Action Method
YinZController. See the MSDN documentation for a complete list of method signatures forHtml.RenderAction().