How do I conditionally add the style ‘color:red’ to the .CurrentDifference if the value happens to be a negative value?
Thanks,
rod.
<div class="sRow">
<div class="sLabel p40">
Difference:
</div>
<%= (!String.IsNullOrEmpty(Model.Amount)?Model.Amount.CurrentDifference.ToString("c"):string.Empty) %>
</div>
Note this is very sloppy. I would consider putting the logic for this in your Controller Action instead of putting conditional logic in your View. Perhaps use tempdata or even expose a new field in your model.