M
Middletree
At first glance, the question in the subject line seems way too easy. But I
am finding some situations in my app where the value in a variable is some
sort of blank-like value, such as Null or " " or "", but I cannot tell
which.
Of course, in order to find out the value, I did a response.write, and added
a nonsense word afterward, to help make sure it is writing it out for me.
First, I tried to check for null:
if IsNull(strOrigValue) then
response.Write strOrigValue & "if"
response.End
else
response.Write trim(strOrigValue) & "else"
response.End
end if
==================
If not NULL, then perhaps it's blank, or a space. I tried this:
if Trim(strOrigValue) = "" then
response.Write strOrigValue & "if"
response.End
else
response.Write trim(strOrigValue) & "else"
response.End
end if
=====================
In both cases, I ended up with "else" being displayed. I am at a loss here.
Is there something else I can check for that will make it fall into the "if"
part of the statement?
am finding some situations in my app where the value in a variable is some
sort of blank-like value, such as Null or " " or "", but I cannot tell
which.
Of course, in order to find out the value, I did a response.write, and added
a nonsense word afterward, to help make sure it is writing it out for me.
First, I tried to check for null:
if IsNull(strOrigValue) then
response.Write strOrigValue & "if"
response.End
else
response.Write trim(strOrigValue) & "else"
response.End
end if
==================
If not NULL, then perhaps it's blank, or a space. I tried this:
if Trim(strOrigValue) = "" then
response.Write strOrigValue & "if"
response.End
else
response.Write trim(strOrigValue) & "else"
response.End
end if
=====================
In both cases, I ended up with "else" being displayed. I am at a loss here.
Is there something else I can check for that will make it fall into the "if"
part of the statement?