似乎 ViewBag.Title & @RenderSection(..) 执行了多次,但我不知道为什么会发生
这是一个新项目,我刚刚实现了一个带有 Index.cshtml 包含的单个视图的控制器
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
和布局:
提前致谢 :)
似乎 ViewBag.Title & @RenderSection(..) 执行了多次,但我不知道为什么会发生
这是一个新项目,我刚刚实现了一个带有 Index.cshtml 包含的单个视图的控制器
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
和布局:
提前致谢 :)
Buried beneath your screenshot I can perceive the root of your problem:
<a href="@Html.Action("Inde........
<img src="~/Content/ima....
</a>
You wanted to use Url.Action
and not Html.Action
which is something entirely different.
<a href="@Url.Action("Inde........
<img src="~/Content/ima....
</a>