The following sections have been defined but have not been rendered for the layout page

前端 未结 5 822
故里飘歌
故里飘歌 2021-02-03 18:13

This is an ASP.NET MVC 3 exception message. What it says? What should I do?

OK, I have this code:

@{
     Layout = \"~/_Layout.cshtml\";
     Page.Title          


        
5条回答
  •  情歌与酒
    2021-02-03 18:38

    Your layout page isn't actually rendering the sections footer and meta

    In your _Layout.cshtml, put in @RenderSection("meta") where you want the meta section rendered.

    You can also do @RenderSection("meta", false) to indicate that the section is optional.

提交回复
热议问题