I was wondering what, if there is one, is the best practice for including SEO content such as meta descriptions and keywords in an ASP.NET MVC (I\'m using v3 RC) view. My in
Add optional section to your layout page:
@RenderSection("ExtraHeadContent", required: false)
Now you can define meta tags on any content page using @section:
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section ExtraHeadContent {
}
The main content
See Optional Razor Sections with Default Content by Marcin Doboz.