Question: I have one layout and one partial view which are in the Shared folder. Partial view presents top menu items which are not static. So I need to call an action method to get menu items from database. To do this, I created a controller and add an action method in it.

When I try to browse the page in web browser, this error occured:

*The controller for path '/' was not found or does not implement IController.*

**Note:**
I tried Html.RenderAction, Html.Partial methods too...
And I tried to create another view folder, and create a new partial view and new controller that named with "folder name + Controller" suffix.

**Layout:**

```
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
</head>
<body>
    <div id="header">
        @Html.Action("~/Views/Shared/_TopMenu.cshtml", "LayoutController", new {area =""}); //Here is the problem.

    </div>
   <div>
        @RenderBody();
   </div>

</body>
</html>

```

**\_TopMenu.cshtml:**

```
@model IList<string>

@foreach (string item in Model)
{
    <span>item</span>
}

```

**LayoutController (in Controllers folder):**

```
 public class LayoutController : Controller
    {
        //
        // GET: /Shared/
        public ActionResult Index()
        {
            return View();
        }

        [ChildActionOnly]
        [ActionName("_TopMenu")]
        public ActionResult TopMenu()
        {
           IList<string> menuModel = GetFromDb();
           return PartialView("_TopMenu", menuModel);
        }    
    }

```

Answer: 
Change this line,

```
@Html.Action("~/Views/Shared/_TopMenu.cshtml", "LayoutController", new {area =""});

```

to,

```
@Html.Action("_TopMenu", "Layout", new {area =""});

```

and check.
You are using the wrong overload of the Action-Method. The 2nd parameter in the variation is not the controllername but the actionname.

You can check the correct Method overloads on this [page](http://msdn.microsoft.com/en-us/library/system.web.mvc.html.childactionextensions.action(v=vs.118).aspx)

Also: If you specify Controllers in the Html.Action Method (which you can do for example with [this](http://msdn.microsoft.com/en-us/library/ee703457(v=vs.118).aspx) variation of the Method), you dont need to write the suffix "Controller" even if thats your Classname. So Instead of using the string "LayoutController" you would write simply "Layout".

At this point the framework is convention-based.