This post is as much for my own use as others as I’m always forgetting how to add sections to an asp.net mvc masterpage.
In the master page add your subsection using:
<footer>@RenderSection(“Footer”)</footer>
and in the views implement this section using:
@section Footer {
<p>This is my footer</p>
}
You can make the section optional in your view:
<footer>@RenderSection(“Footer”, required: false)</footer>