consider this code:
<li class="active" hidden="@ViewBag.isAdmin">
How can i write !ViewBag.isAdmin
in razor?
please not to !.
Use some parentheses:
@(!ViewBag.isAdmin)
Phil Haack wrote a great summary of Razor syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With