在 view 中加入
之後在該 view 的 layout 補上
- @section styles {
- <link href="@Url.Content("~/Content/xxx.css")" rel="stylesheet" type="text/css" />
- }
如果沒加上面那串你會碰到
- @RenderSection("styles", false)
下列區段已定義但尚未為版面配置頁 "~/Views/Shared/_XXX.cshtml" 呈現: "styles"。
的錯誤。
ref:stackoverflow1、stackoverflow2
沒有留言:
張貼留言