suppose you are having two labels in gridview as :
<asp:TemplateField HeaderText="FromDate">
<ItemTemplate>
<asp:Label ID="lblFromDate" runat="server" Text='<%#Eval("fromdate") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ToDate">
<ItemTemplate>
<asp:Label ID="lblToDate" runat="server" Text='<%#Eval("todate") %>'></asp:Label></ItemTemplate>
</asp:TemplateField>
Then you compare the two dates in
RowDataBound
Event using
DateTime.Compare
function such as:
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label fromdate = (Label)e.Row.FindControl("lblFromDate");
Label todate = (Label)e.Row.FindControl("lblToDate");
DateTime fdate = Convert.ToDateTime(fromdate.Text);
DateTime tdate = Convert.ToDateTime(todate.Text);
if (DateTime.Compare(fdate, tdate) > 0)
{
fromdate.Style.Add("text-decoration", "blink");
}.......
get more infomation about DateTime.Compare from google.
Hope this helps.