Apologies if this has been answered somewhere (couldn't find anything though)...
I have an MVC4 project and I'm using the MVC controls to add a menu to the page from a partial view.
On the _Layout.cshtml file I have:
And then in the Navigation.cshtml file I have:
(Sorry for squishing it together. The debugger threw exceptions when I had items on different lines, too).
However, I get a very non-descript error message whining about a missing semicolon, when this would work fine on the _Layout.cshtml page. I really don't want to put it there unless I have no other choice. There error is:
HttpException:
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
The inner exception reveals:
Navigation.cshtml(15): error CS1002: ; expected"
But none of that would happen on the _Layout.cshtml page.
Thoughts?