I tried to follow some examples on the internet without success
I'm trying the following in a GridView1_RowDataBound methode
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drv = e.Row.DataItem as DataRowView;
if (Convert.ToDateTime(drv["Created_Date"]).ToString("dd-MM-yyyy") == "01-01-1900" || (drv["Created_Date"].ToString().Equals(DBNull.Value))) //Check for this date
{
e.Row.Cells[11].Text = "test";
}
}
}
I'm still receiving a Object cannot be cast from DBNull to other types.