SparkViewEngine、RenderAction 和 ASP MVC 2 Beta 区域?

发布于 2024-08-13 06:38:52 字数 369 浏览 4 评论 0原文

我刚刚使用 MVC 2 Beta 的 Spark AreaDescriptionFilter 遇到了麻烦。

以下行来自我的 Application.spark 文件。它导致视图引擎查找视图的所有可能位置 - 除了“Shell”区域的文件夹中。

# Html.RenderAction("ShowMainMenu", "Navigation", new { area = "Shell" });

使用 http://localhost/Shell/Navigation/ShowMainMenu< 运行相同的操作/code> 执行良好并按预期识别该区域的视图目录。

有什么想法如何解决这个问题吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深海里的那抹蓝 2024-08-20 06:38:52

Spark 和一些渲染方法存在一个已知错误。您是否尝试直接从 Spark 的源存储库获取最新版本的 Spark?

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?

一场春暖 2024-08-20 06:38:52

不是有大小写不匹配的情况吗?而不是面积 =

Html.RenderAction("ShowMainMenu", "Navigation", new { area = "Shell" });

你应该有面积 =

Html.RenderAction("ShowMainMenu", "Navigation", new { Area = "Shell" });

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" });
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文