By Tim Sullivan
If all you want to see is if the variable is "blank", try using this nifty function instead of messing around with "IsNull".
function PoorMansIsNull(str) Dim blankStr blankStr = trim("" & str) if blankStr = "" then PoorMansIsNull = True else PoorMansIsNull = False end if end function
The ("" & ) before the request variable forces VB to convert NULLS to blank strings. Maybe a little more overhead, but much easier to code and understand. You can use this nifty little function to determine if form fields are blank or not. For example, if you wanted to tell if the user entered his or her name in a field in a form, you could write the following code:
If PoorMansIsNull(Request("txtName")) then
Response.Write("You didn't enter your name!")
else
Response.Write("Thanks for entering your name.")
end if
Enjoy!




