How to use ? : if statements with Razor and inline code blocks
@( condition ? "true" : "false" )
The key is to encapsulate the expression in parentheses after the @ delimiter. You can make any compound expression work this way.
This should work:
<span class="vote-up@(puzzle.UserVote == VoteType.Up ? "-selected" : "")">Vote Up</span>