I just downloaded the MVC 3.0 RC and I\'m excited to start using it, especially the Razor view engine. However, due to a few stick in the mud type people here, we are stuck
UPDATE:
You can use @li@genreName/li without the : because your HTML tags are self closing, if they weren't then you would need to use @: but you do not, this is clarified in the link provided by Gabe. Also, @
will also work! I would hate for people to think they need to use @: all the time because they don't, if this were the case I'd be onto Andrew nurse about this hardcore :)
END UPDATE
Here is the basic syntax for vb razor,
The @ character starts inline expressions, single-statement blocks, and multi-statement blocks:
?
@Code Dim total = 7 End Code
@Code Dim myMessage = "Hello World" End Code
The value of your account is: @total
The value of myMessage is: @myMessage
@Code
Dim greeting = "Welcome to our site!"
Dim weekDay = DateTime.Now.DayOfWeek
Dim greetingMessage = greeting & " Today is: " & weekDay.ToString()
End Code
The greeting is: @greetingMessage
So it should work, just close code mode at the end of the for each line and your back in HTML, this would avoid you using the @: - hunt to ellon, I think he is trying to not have to use @: