|
-
Dec 28th, 2000, 02:25 PM
#1
Thread Starter
Fanatic Member
I am trying to use a select case in an ASP page and am having problems.
here is what I am trying to do
select case bh.fullversion
case 3
Response.Write "browser is old and junky, you get the dumbed down version of our otherwise kickass site"
case 4
Response.Write "you got a good enough browser so now we check other things.....hang on..."
case else
Response.Write "Bummer"
end select
If I try and put in something like this..
case < 4
I get an error from the less than sign.
I need to say something like
if < 4 and (something else) then
do something.
I would like to use select case statment but can't seem to get it to work.
basicly I can't get it to accept the greater than or less then sign.
any help???
thanks
-
Dec 28th, 2000, 02:30 PM
#2
re:
Try saying
case 1 To 3
instead of
Case < 4
-
Dec 28th, 2000, 02:49 PM
#3
Thread Starter
Fanatic Member
I get an error now from the word 'to'.....
what I am checking is browser versions so I need to say if the version is 3 or 3.3 or 2.4 or 2.1 ect....
I think I will just need to use a if statment....
oh well.....
-
Dec 28th, 2000, 02:52 PM
#4
In a Select Case statement, if you want your Case to test for something other than equal, you have to use the word Is:
Case Is < 4
....
I don't know why you are getting an error on "To". Syntax like "Case 1 To 3" should work.
"It's cold gin time again ..."
Check out my website here.
-
Dec 28th, 2000, 04:48 PM
#5
Thread Starter
Fanatic Member
I get a microsoft VBscript compilation error '800a03ea'
when I use the 'is' word.
oh well, like I said I am just gonna use an standard if statement.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|