I follow the ASP.NET MVC Tutorial and started working in VB.NET. I'm having trouble converting the following razor code
I have
<ul> @For Each g As MvcApplication1.Genre In Model <li> @g.Name </li> Next </ul>
but getting
Sepcifier Attribute Not Complete
for both <li> tags. I understand that I need to use the extension of the line, but I can not understand where. I would be baud if you could point out a problem.
<li>
Put the @ symbol before li :
li
<ul> @For Each g As MvcApplication1.Genre In Model @<li>@g.Name</li> Next </ul>
I would recommend you the following article .
I think your <li> should be added using the @: operator based on this post:
@:
Distinctive features of the Razor engine in VB.NET
Try using a text tag that will show the razor views that the following is the normal html markup, they don't actually display:
<ul> @For Each g As MvcApplication1.Genre In Model <text><li> @g.Name </li></text> Next </ul>