In my cshtml files I have a lot of blocks with stuff like this:
@if(Model.foo) { Hello World }
The only reason
many developers has provided many ways above .. here is one more which is working fine in MVC 4 .. I hope it will work for MVC 3 also ..
@if(Model.foo) { @Html.Label("Hello World") }