This should not be as hard as it seems to be, but I can’t for the life of me create a table in VB using Razor syntax. The following does not work (despite what some examples would lead me to believe):
<table>
@Code
For Each item in Model
@<tr>
@<td>@item.DocumentType</td>
</tr>
Next
End Code
</table>
This gives me the following error:
Parser Error Message: “<” is not valid at the start of a code block.
Only identifiers, keywords, comments, and “(” are valid.
Thanks in advance for the help!
Try removing the
@before the<td>:or a bit shorter:
Once again you must remove the
@before the<td>.