I am looking to evaluate two strings from my dataset to identify a class description using a ternary operator. I continue to get a compiler error when running this code stating that "Expression Expected". I think that it has to do with the comparison of strings but I have tried other comparison operators and can't seem to get it to work.
<ItemTemplate>
<tr>
<td><%# FormatDateTime(Eval("GameDate"), DateFormat.ShortDate)%></td>
<td class="<%# (Eval("Team1Score").ToString() > Eval("Team2Score").ToString()) ? 'Winner':'' %>"><%# Eval("Team1")%></td>
<td><%# Eval("Team1Score")%></td>
<td><%# Eval("Team2")%></td>
<td><%# Eval("Team2Score")%></td>
</tr>
</ItemTemplate>
Here is my sample data:
GameDate Team1 Team1Score Team2 Team2Score Winner
2012-04-14 Blues 5 Reds 3 Blues
2012-04-13 A's 4 B's 2 A's
2012-04-11 Blues 1 A's 1 Tie
2012-04-13 B's 3 Reds 2 B's
2012-04-10 Blues 7 B's 4 Blues
Thank you for your help