VBScript IsNullFunction
Complete VBScript Reference Manual
The IsNull function returns a Boolean value that indicates whether the specified expression contains invalid data (Null). It returns True if the expression is Null, otherwise it returns False.
Syntax
IsNull(expression)
| Parameters | Description |
|---|---|
| expression | Required. An expression. |
Example
Example
<script type="text/vbscript">
Dim x
document.write(IsNull(x) & "<br />")
x=10
document.write(IsNull(x) & "<br />")
x=Empty
document.write(IsNull(x) & "<br />")
x=Null
document.write(IsNull(x))
</script>
Dim x
document.write(IsNull(x) & "<br />")
x=10
document.write(IsNull(x) & "<br />")
x=Empty
document.write(IsNull(x) & "<br />")
x=Null
document.write(IsNull(x))
</script>
The above example outputs:
False
False
False
True
False
False
True
Try it yourself »
Complete VBScript Reference Manual Other Extensions