Consider this example:
<input type="checkbox" @if (flag) { @: checked } />
The problem is that the } /> is conceived by the Razor engine as part of the output string.
I've tried to use parenthesis but no luck.
Is there a way to terminate the @: operator in same line, or I'll have to split it to other line / use ternary operator?
Aucun commentaire:
Enregistrer un commentaire