title: how to change back ground colour in grid view if column date is more then todays date
body: <p>i want to show if renewal date column date greater than todays date then it should highlight with background color = red . here im not getting the value in cell 7. the value is in renewal date col -  15-02-2014 </p>
  
  <pre><code> &lt;asp:TemplateField HeaderText="Renewal Date"  &gt;
          &lt;ItemTemplate&gt;
                &lt;a href='ChangeRenewaldate.aspx?Linkid=&lt;%#Eval ("LinkId")%&gt;'&gt;
                &lt;asp:Label ID="lblRenewal" runat="server"  Text='&lt;%# Eval("RenewalDate","{0:dd-MM-yyyy}") %&gt;'&gt;&lt;/asp:Label&gt;          &lt;/ItemTemplate&gt;    
       &lt;/asp:TemplateField&gt;
  
  
  protected void GrdV_Projects_RowDataBound(object sender, GridViewRowEventArgs e)
      {
          if (e.Row.RowType == DataControlRowType.DataRow)
          {
              if (!string.IsNullOrEmpty(e.Row.Cells[7].Text))
              {
                  if (e.Row.Cells[7].Text &gt; DateTime.Now.ToString())
                  {
  
                      e.Row.Cells[7].BackColor = System.Drawing.Color.Red;
                  }
                  else
                  {
  
                      e.Row.Cells[7].BackColor = System.Drawing.Color.Green;
                  }
              }
          }
      }
  </code></pre>