Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

"OR" CODING

Posted 06 Apr 2004 12:51:28
1
has voted
06 Apr 2004 12:51:28 A B posted:
I have in my search engine code

If UCase(Right(objFile.Name,4)) = ".XLS" then...

i want it to say sumthing like

If UCase(Right(objFile.Name,4)) = ".XLS" OR ".DOC" then...

but this does not work? any ideas?

Thanks!

Replies

Replied 06 Apr 2004 17:32:10
06 Apr 2004 17:32:10 stuart steele replied:
you could try this (VB-ASP)

dim sTmp
sTmp = UCase(Right(objFile.Name,4))

Case Select sTmp

Case ".xls", ".doc"
do some code


Case Else
Do some other code

End Select

which can be expanded to this

dim sTmp
sTmp = UCase(Right(objFile.Name,4))

Case Select sTmp

Case ".xls", ".doc"
do some code

Case ".doc"
some slightly different code

Case Else
Do some other code

End Select

hpe this helps


---
Stuart D Steele
www.stuweb.co.uk
www.swim-masterclass.co.uk
Replied 06 Apr 2004 17:45:43
06 Apr 2004 17:45:43 A B replied:
YEP CHEERS u know anythink about javascript??? i left a posting under the javascript if you wanna have a look :

www.dmxzone.com/forum/topic.asp?TOPIC_ID=27906&FORUM_ID=10&CAT_ID=5&Topic_Title=Accessing+Javascript+from+different+server&Forum_Title=JavaScript

Reply to this topic