I am checking to see if a datetime field from a SQLDataReader loop has been marked with a datetime.
if (myReader["Next"] != null)
Response.Write("<div id='delivered" + ID + "' class='buttons green' onclick='delivered(\"" + ID + "\");'>DELIVERED</div>");
Response.Write("<div id='next" + ID + "' class='buttons green' onclick='next(\"" + ID + "\");'>NEXT</div>");
None of my records have the "Next" field marked with a date and time in my test, so the "else" should be executed, but instead the "if" is executed. So my check for a null value is failing probably because there is something that I don't understand about datetime values. A quick second pair of corrective eyes from anyone would be helpful. Thanks.