Probably not quite answering your question about testing if the section will display some content, but you can check if the section is defined and visualize it or provide default content if this section is not defined:
@if (IsSectionDefined("Right")) {
@RenderSection("Right")
}
else {
<div>Default content</div>
}
source
share