I have a number of fields where I want to display the data in red if it is expired.
<%= Html.Encode(String.Format("{0:d}", Model.Subcontract.insurance_GL))%>
If the date is less than today's date, then I'd want it to display in red. What is the best way to do this?
EDIT This is for my Detail View. It's not in a grid. It's just a listing of the fields for the individual Subcontract. There's, insurance_GL, insurance_AL, insurance_WC, etc. Different fields, not the same field repeating in a grid.
I would add a class to the field if the value is less than zero.
So I'm not sure what types of HTML elements are wrapping your field values, but using your example I would do this: