Duplicar posibles:
How to use ternary operator in razor (specifically on HTML attributes)?ternario operador en Razor Ver
que estoy tratando de hacer lo siguiente pero su erroring por lo que estoy haciendo algo mal, obviamente, con la sintaxis Razor:
<td>@{item.Licence.MachineId != null ? @:"TB Master" : @:"HandHeld"} </td>
relacionadas: http://stackoverflow.com/questions/7729024/asp-net-mvc-razor-ternary –