I am working on a dynamic menu system for MVC and just to make it work, I created a partial view for the menu and it works great using the syntax below:
@Htm
set your menu up as an action then call it in your master layout.
use @Html.Action()
the action can return a partial view with your menu code in it.