Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am building MVC 4 online shop , after finishing what i want , i downloaded bootstrap for online shop homepage , i put the css files in content folder and js files in scripts folder , then copied the code of this bootstrap to my _Layout.cshtml, after running the project i am getting this error:
System.Web.HttpException: The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml": "featured".

And this is the bootstrap homepage i am trying to get:
Shop Homepage - Bootstrap Ecommerce Store Template - Start Bootstrap[^]

What I have tried:

well i tried adding render sections , it somehow worked but not the design of the homepage i want ,i want my homepage like the one that in the link above, but i am beginner in mvc ,so that's why i need some help please
Posted
Updated 12-Jul-17 5:04am

1 solution

asp.net - The following sections have been defined but have not been rendered for the layout page “~/Views/Shared/_Layout.cshtml”: “featured” - Stack Overflow[^]

You need to update your layout page to specify that the "featured" section is not required:
@RenderSection("featured", required: false)
 
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