What I'm trying to do is simple:
<td class="bold-and-caps">@{if (++i == 1) { subsec.Title } else { String.Empty } } </td>
except I'm getting
"Only assignment, call, increment, decrement, await and new object expressions can be used as a statement"
on subsec.Title
and String.Empty
.
How am I supposed to write "If condition, output X" type statements in Razor?