I use ASP MVC NET6 (Razor page). how to use IIF?, like the following:
<li >
<span >Is Supervisor:</span>
<span >(@Model.isSupervisor ? 'YES' : 'NO')</span>
</li>
CodePudding user response:
You needs to move @
outside ()
.Try to use the following code:
<span >@(Model.isSupervisor ? "YES":"NO")</span>