This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Description
If you define a section in your layout page, that section can only be "filled" from within the main view (Index.cshtml for example). If you try to do
from a partial view, razor will just ignore the section which leads to a lot of confusion as it fails silently (ignores the section). This is specially troubling when you are rendering a non visible element (like a script) in the section.
We could improve the behavior by:
- Allowing the section to be rendered anywhere, but enforcing just one render per section name. (If two components try to render the same section we'll fail).
- Do not allow to render section within partial views but throw an exception.
- Provide a clear warning by using tooling.