You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
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
@section mySection{
}
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.
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: