I'm working on a project which has several sections defined as follows:
@RenderSection("Sidebar.Top", false)
<div>somecontent</div>
@RenderSection("Sidebar.Bottom", false)
I want to render something in the bottom sidebar section, but when I use @section Sidebar.Bottom{}
I get an error message saying
Cannot resolve section 'Sidebar'
Am I not allowed to use a .
in a section name or is there a way to make this work?
you can't use points in a section name, but it's a very good question!
You cannot use a "." in the name of a section.
You can't use "."s in section names in ASP.NET MVC 4.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With