I want to use multiple operators like =, >, && in my if statement. I only want to send the email when this condition is true if (strAuthReqDate == null && strDate < strExpectedSubDate). So i think my "less than operator" is wrong pls let me know what i am doing wrong here. thanks
Here is my code:
foreach (GridViewRow gr in GridView1.Rows)
{
CheckBox cb = (CheckBox)gr.FindControl("chkItem");
if (cb.Checked)
{
// string strID = gr.Cells[0].Text;
string strExpectedSubDate = gr.Cells[3].Text;
string strAuthReqDate = gr.Cells[8].Text;
string strDate = Convert.ToString(System.DateTime.Now);
if (strAuthReqDate == null && strDate < strExpectedSubDate)
{
send email();
}
}
}