Click to See Complete Forum and Search --> : Is there ISSET thing in asp? Very urgent


turb
06-10-2004, 04:07 PM
Hi!

in php, to check is a variable exist, we use isset... is there a similar thing in asp??

buntine
06-10-2004, 08:17 PM
There are a few options, which i have outlined below.

IsEmpty(expression) '| Will return true if the given expression contains a value.

IsNothing(expression) '| Will return true if the given expression has been declared.

IsObject(object variable) '| Returns a boolean value, true is the given variable contains an active ASP object.

IsArray(expression) '| Returns true if the given expression is an array.

Alot of developers simply use the equality operator to determine whether a given variable equals an empty string ("")

If variableName = "" Then
'| Statement sequence
End If

By 'expression', i simply mean any valid statement, which retruns a value.

Regards,
Andrew Buntine.

Bullschmidt
06-18-2004, 02:47 AM
And for all available functions:

Visual Basic Scripting Edition Functions
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtorifunctions.asp