That is real helpful isn't it? You can tell a lot from that error right? NOT!!!! That error might lead you to believe that some controller is having an issue. That is not the case! Instead, that error means that you have not set up your Html.Action item correctly. To get your areas to cooperate with Html.Action, you have to set your link up like this.:
Html.Action("YourMethod", "YourController", new { area = "YourArea" })
You might be wondering what you should do if you are using Html.Action and you are using a controller that is NOT in an area. Well let me tell you so you can stop wondering. You set up the action method like this:
Html.Action("YourMethod", "YourController", new { area = "" })
And that is it!!
Smooches,
Kila Morton
Problem:
"The controller for path was not found or does not implement IController"
Solution:
Use
Html.Action("YourMethod", "YourController", new { area = "YourArea" })
if you are referencing something inside of an area.
Use
Html.Action("YourMethod", "YourController", new { area = "" })
if you are not referencing something outside of the areas
No comments:
Post a Comment