カスタム領域から _layout ファイルで定義されているセクションをレンダリングしようとしています。
私の地域では、ルート サイトの _layout を指す _ViewStart があります。
使用しようとしているセクションは head タグにありますが、私の地域では body に配置されています。
ルート レベルでレンダリングされるページは正常に動作します。
〜/Views/Shared/_Layout.cshtml
<head>
@RenderSection("header", true)
</head>
<body>
....
</body>
~/Areas/UserMedia/Views/_ViewStart.cshtml
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
~/Areas/UserMedia/Views/ManageProjectMedia.cshtml
@{
ViewBag.Title = "ManageProjectMedia";
}
@section header{
{
<!-- scripts and styles -->
}
<div>
... page content
</div>