Can I check for the presence of the provided content section when using the RenderSection helper in ASP.NET MVC 3?
For instance:
@RenderSection("RightCrumbContentArea", required: false)
If not specified above, I want to create different content.
Perhaps as far as I know.
Try using the following code:
@if (IsSectionDefined("RightCrumbContentArea")) { @RenderSection("RightCrumbContentArea") } else { <span>poo</span> }