Introduction
 			I have written following code for DataList Compare Two Date in ItemDataBound Event.The code is useful to find datalist control in ItemDataBound. ItemDataBound events gives access to item inside datalist  the DataList or you can access the item’s value.
 Using Code
 Step 1: Create A DataList
 - <asp:DataList ID="dlDate" runat="server" Style="width: 100%" OnItemDataBound="dlDate_ItemDataBound">  
 -     <ItemTemplate>  
 -         <asp:Label ID="lblDate" Text='<%#Eval("DateTime")%>' runat="server">  
 -         </asp:Label>  
 -     </ItemTemplate>  
 - </asp:DataList>  
 
Step 2: Use OnItemDataBound Event
 - protected void dlDate_ItemDataBound(object sender, DataListItemEventArgs e)  
 - {  
 -     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)  
 -     {  
 -         Label lblDate = (Label) e.Item.FindControl("lblDate");  
 -         DateTime dtDateTime = Convert.ToDateTime(lblDate.Text);  
 -         DateTime dtCurrentDatetime = Convert.ToDateTime(System.DateTime.Now);  
 -         int result = DateTime.Compare(dtDateTime, dtCurrentDatetime);  
 -         if (result == -1)  
 -         {  
 -             lblDate.Style.Add("text-decoration", "line-through");  
 -         }  
 -     }  
 - }  
 
  You can apply any css and change text in lblDate.