SparkViewEngine, RenderAction and Areas with ASP MVC 2 Beta?
-
12-09-2019 - |
Question
I just ran into trouble with the AreaDescriptionFilter of Spark using MVC 2 Beta.
The following line is from my Application.spark file. It results in the view engine looking in all possible locations of the view - except in the folders of the area "Shell".
# Html.RenderAction("ShowMainMenu", "Navigation", new { area = "Shell" });
Running the same action using http://localhost/Shell/Navigation/ShowMainMenu
executes fine and recognizes the area's view directory as expected.
Any ideas how to fix this?
Solution
There's a known bug with Spark and some of the render methods. Did you try grabbing the latest version of Spark directly from its source repository?
OTHER TIPS
Isn't there a case mismatch? Instead of area =
Html.RenderAction("ShowMainMenu", "Navigation", new { area = "Shell" });
you should have Area =
Html.RenderAction("ShowMainMenu", "Navigation", new { Area = "Shell" });