为什么Razor View Engine的搜索位置不正确

时间:2013-07-25 17:44:34

标签: asp.net vb.net asp.net-mvc-3

今天在使用VB.NET MVC应用程序时完全奇怪的行为。我添加了一个部分视图并得到了这个。谁看过这个吗?我最后只是命名这样的文件

_SavedSearchesGrid.vbhtml.vbhtml
SavedProperties.vbhtml.vbhtml

它有效..去图......

    <div class="container-fluid">
        @Html.Partial("_SavedSearchesGrid.vbhtml")
        @Html.Partial("SavedProperties.vbhtml")
    </div>

Double Extensions

1 个答案:

答案 0 :(得分:4)

当您致电.vbhtml时,请勿在结尾处指定Partial

<div class="container-fluid">
    @Html.Partial("_SavedSearchesGrid")
    @Html.Partial("SavedProperties")
</div>

这是尝试所有已安装的不同视图引擎。