|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Variabel declared in ASP
Hi!
How can I check if a variabel is declared or not in classic ASP? Thank you! |
|
#2
|
||||
|
||||
|
have <%option explicit%> at the top of your ASP page ... then if you use a variable without first using this type of statement 'DIM your_Variable' ... it will tell you that variable is undefined.
__________________
Come JOIN the party!!! Quote of the Month: Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
|||
|
|||
|
Quote:
Thank you for your quick reply. What I want to do is something like: if isDeclared(variableName) then ... else ... end if Is there some easy way I can do that? |
|
#4
|
||||
|
||||
|
No, the Option Explicit statement requires that all variables be declared before using them.
There isn't anything like an "IsDeclared" function in ASP. |
|
#5
|
|||
|
|||
|
Well, thank you anyway, I'll find out some other way to do it.
|
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Variabel declared in ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|