I'm trying to render a custom section within a form in VB.NET MVC3? the section is in the master layout, and is defaulted - but id like to create a custom one when in a particular view
when i try
@Using Html.BeginForm()
..my markup
@Section footerMenu
..custom footer markup
End Section
End Using
EDIT: The Section is delcared in my _Layout.vbhtml
<div id="footer">
@If (IsSectionDefined("footerMenu")) Then
@RenderSection("footerMenu")
Else
...default markup
End If
</div>
I get this error:
Unexpected "Section" keyword after "@" character. Once inside code, you do not need to prefix constructs like "Section" with "@".
Of course removing the "@" causes another error:
Compiler Error Message: BC30451: 'Section' is not declared. It may be inaccessible due to its protection level.
Is this possible to do?