The Rnd function generates a pseudo-random number greater than
or equal to 0.0 and less than 1.0.
The Number argument is optional, but different numbers
will give different pseudo-random numbers.
Note that the number generated is pseudo-random, because the same
output tends to be repeated over and over. You can use the
Randomize statement to over come this problem.
<% =Rnd() %>
0.7055475
<% =Rnd(127.89) %>
0.533424
<% =Rnd(-127.89) %>
0.6953956
<% Randomize %>
<% =Rnd() %>
0.1414095
<% upperlimit = 50000.0 %>
<% lowerlimit = -30000.0 %>
<% =Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit)%>
30366
This code will generate a random number between any limits you choose. (Since the Int function always rounds down, we add one to the difference between the limits.)