some...">

MVC4 section name with dot

I am working on a project that has several sections defined as follows:

@RenderSection("Sidebar.Top", false) <div>somecontent</div> @RenderSection("Sidebar.Bottom", false) 

I want to do something at the bottom of the sidebar, but when I use @section Sidebar.Bottom{} , I get an error

Cannot resolve sidebar section

I am not allowed to use . in the section name or is there a way to do this?

+6
source share
3 answers

you cannot use dots in the section name, but this is a very good question!

+7
source

You cannot use "." in the section title.

+5
source

You cannot use "." s in section names in ASP.NET MVC 4.0

+5
source

Source: https://habr.com/ru/post/958924/


All Articles