[thelist] HELP ASP gurus -- random numbers is hard

aardvark roselli at earthlink.net
Tue Dec 5 13:13:18 CST 2000


> From: Edd Partee <edd at vilocity.com>
>
> Sorry about the confusion. What I want to do is CHOOSE randomly from a
> group of numbers (0 - 19). This is the code I'm using (mostly from the
> WROX Beginning ASP book):

i see... how about this?

<%
'#### Enter Number of Images for Randomization
 
NumImages = 19

'#### Don't touch this part
Randomize
intChoice = Int(Rnd * cint(NumImages))
'#### 
%>

it returns a value from 0 to the number you specify (i inserted 19)...

then you can just call intChoice for the number...

this is from memory, so you should test it...




More information about the thelist mailing list