Groups | Blog | Home
all groups > asp.net datagrid control > july 2005 >

asp.net datagrid control : email sending comparing with date using windows service (c#)


satish c via DotNetMonster.com
7/13/2005 9:27:37 AM
just like reminders..........i want to send an email comparing with date(the
date is in datagrid)..sending email is not a problem for me...but how to
comare the date and where can i write code......
one of mr friend is said that this is possible with windows service....
Elton Wang
7/14/2005 8:51:27 AM
In datagrid_ItemDataBound event, you can do comparison:

if (e.Item.ItemType== ListItemType.Item || e.Item.ItemType==
ListItemType.AlternatingItem){
DateTime today = DataTime.Today;
DateTime date =
Convert.ToDateTime(e.Item.Cells[date_column_index].Text);
if (date < today)
{
// send mail
}
}

HTH

Elton Wang

[quoted text, click to view]

AddThis Social Bookmark Button