Wednesday, June 13, 2007

Null Check

Always check Null before use that Object or values


ex..
If IsNothing(Session("mainID")) = True Then
'Do this Job
End IF

if its database value means u must check isNull ( if the field allowed null value )

If IsDBNull(reader("mainNameMiddle")) = False Then
'Do this Job
End If

No comments: