Html.RenderAction cannot find my controller
asp.net-mvc-3
Solution
When specifying controller names by convention in MVC, you don't include the "Controller" part.
Html.RenderAction("Index", "LoginController")
wouldn't work unless you had a controller named "LoginControllerController"
try
<div id="Misc">@{ Html.RenderAction("Index", "Login");}</div>
Problem
I have a razor masterpage (_Layout.cshtml) where I layout a 3 column website. In one of the side columns I want to display a "Login Control" From my readings, I can use Html.RenderAction to call my LoginController and it will display the login view in the side column. But, when I run it and point it to a Controller/View to fill the RenderBody(), the call to Html.RenderAction("Index", "LoginController") fails with this error. ``` "The controller for path '/[insert path to a Controller/View to fill the RenderBody()]' was not found or does not implement IController. " ``` So, what am I doing wrong? My code really is as simple as: ``` <div id="Navigation">@{ Html.RenderPartial("Test"); }</div> <div id="Main">@RenderBody()</div> <div id="Misc">@{ Html.RenderAction("Index", "LoginController");}</div> ``` And in my controllers folder, I have the controller for the RenderBody and the LoginController.