I have a DataRow which contain data from database. I want to check each data column for Null value in an IF condition.
I found two ways to check NULL value.
If IsDBNull(drType("ISShort")) Then
StartDate.Visible = True
Else
StartDate.Visible = False
End If
and
If Not drType("ISShort").ToString Is DBNull.Value Then
StartDate.Visible = True
Else
StartDate.Visible = False
End If
Both works fine for me but I don't know which one is better to use ?