In my application I want to have one view that holds 2 partial views. The partial views have different controllers. How would I do that?
@Html.Partial("../MyFolder/Index", Model.MyModel)
Doesn’t work. I want to call the controller for MyFolder, not the controller that holds the partial views.
Your question is a little confusing since a Partial is not bound to a controller. Sure you can put partials in the same folder that the views associated with a controller are in, but that doesn’t mean you have to use that controller to render them. Anyways, you just need the tilda to go to the root directory: