In a tag I want to conditionally output the style attribute, e.g.: <li style="@styleVar" >...</li>
When styleVar is null it should not be written by razor (just the supposed standard functionality in Razor 2), but for some strange reason it is outputted as <li style="">...</li>
, while I expect <li>...</li>
.
This is in a partial view. In a normal view it is working. So is this a bug in partial views?
Anybody the same experience?