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

前端 未结 5 824
故里飘歌
故里飘歌 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:24

    The error message implies that your _Layout.cshtml does not include @RenderSection statements for the @sections that you have in your view.

    Check your Layout and let us know.

    See this page for more information.

提交回复
热议问题