22

I have an AREA called "Admin"

It uses the same layout page as the rest of my site. In the layout page I have

 @Html.Action("MyMethod", "MyController", null) 

MyController is not in the Admin area but at the root/controllers folder when I go to any page in side the AREA I get the following execption

"The controller for path '/admin/home' was not found or does not implement IController"

Yannick Blondeau
  • 9,465
  • 8
  • 52
  • 74
Daveo
  • 19,018
  • 10
  • 48
  • 71

1 Answers1

49

Try like this:

@Html.Action("MyMethod", "MyController", new { area = "" }) 
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928