I've got the following simple code:
@for (int j = 0; j < file.Items.Count; j++) {
var item = file.Items[j];
if (item.Errors.Count > 0)
{
Html.Raw("<tr class='errors'>");
}
else {
Html.Raw("<tr>");
}
<td>blah</td>
</tr>
}
However, I keep getting a parsing error saying that the closing </tr>
has no opening tag. What am I missing? If I replace the if statement with a regular <tr>
then it works fine.