ItemDataBound I create a button if the status is pending and past 10 days...I assign the click event handler to it, but it doesn't seem to fire
//If Date.Now is at least 10 days past the notification date
if (DateTime.Now > DateTime.Parse(item.Cells[8].Text).AddDays(10))
{
TableCell cell = new TableCell();
Button notifyButton = new Button();
notifyButton.Text = "Re-send Notificaiton";
notifyButton.Click += new EventHandler(notifyButton_Click);
cell.Controls.Add(notifyButton);
item.Cells.Add(cell);
}
Any idea what should I be doing to get it to fire?
//If Date.Now is at least 10 days past the notification date
if (DateTime.Now > DateTime.Parse(item.Cells[8].Text).AddDays(10))
{
TableCell cell = new TableCell();
Button notifyButton = new Button();
notifyButton.Text = "Re-send Notificaiton";
notifyButton.Click += new EventHandler(notifyButton_Click);
cell.Controls.Add(notifyButton);
item.Cells.Add(cell);
}
Any idea what should I be doing to get it to fire?