ASP null value test judgment function, friends who learn ASP can refer to it.
Copy the code code as follows:
'Function: null value test
Function inull(Val)
Dim tmp
tmp=False
If IsNull(Val) Then
tmp=True
ElseIf IsEmpty(Val) Then
tmp=True
ElseIf Trim(Val) = Then
tmp=True
End If
inull = tmp
End Function
Test whether the variable is a null value. The meaning of a null value includes: the variable does not exist/is empty, the object is Nothing, 0, an empty array, and the string is empty.
Function IsBlank(ByRef Var)
IsBlank = False
Select Case True
CaseIsObject(Var)
If Var Is Nothing Then IsBlank = True
Case IsEmpty(Var), IsNull(Var)
IsBlank=True
CaseIsArray(Var)
If UBound(Var) = 0 Then IsBlank = True
CaseIsNumeric(Var)
If (Var = 0) Then IsBlank = True
Case Else
If Trim(Var) = Then IsBlank = True
End Select
End Function