Click here to Skip to main content
15,860,861 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my MVC4 project I am getting the below error. I can not find anything that says "featured" in my "_Layout.cshtml".

How do I "render" the correct sections?
The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml": "featured". 
Posted

1 solution

Your view seems to have "@section featured" defined somewhere, and that tries to give output to section called feature[Which is not defined in your layout page].

So solution can be one of the following

1. Remove section from your view which contains "@section featured"

OR

2. Add @RenderSection("featured", required: false) into your layout page
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900