Southern_Gentleman
asked on
Red Font for Dates 21 > than today
I'm using ASP.net and have a gridview with a date column. I'm trying to highlight in redfont all the dates that are 21 days greater than Todays current date. I have a css .redfont with bold font-weight. I'd like to do this as an itemtemplate. What the way to do this via EVAL.
ASKER
Thanks Kyle, keep coming with an error.
BC30108: 'TimeSpan' is a type and cannot be used as an expression.
BC30108: 'TimeSpan' is a type and cannot be used as an expression.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try DateTime.TimeSpan instead of just the timespan.
ASKER
Thanks Scott, got it to work like a champ.
Awesome! Did you use momentjs?
ASKER
Yes, I then added it to the cell style of my gridview.
class = '<%# ((TimeSpan) DateTime.Now - DateTime.Parse(Eval("Start