Reputation: 21176
I have 2 Controllers
- HomeController
- Index()
- AccountController
- Login()
In my Home/Index.cshtml I want to Load The AccountController/Login method which then returns a view and displays it in my Home/Index view.
Home/Index.cshtml
<div class="row-fluid">
<div class="col-md-12">
<!-- Render the view that the AccountController/Login method denotes -->
</div>
</div>
How do I do this?
Upvotes: 11
Views: 56508
Reputation: 23117
use this with your actual Controller/View names
@Html.Partial("../Home/Login", model)
or
@Html.Action("action", "controller", parameters)
Upvotes: 31