The Random method returns an integer between –32768 and 32767. This method is similar to the Rnd function but returns an integer. To get a positive random integer, use the Abs function. To get a random integer below a specific value, use the Mod function.
oTools.Random
--- Tools_Random.asp ---
<%
Set oTools = Server.CreateObject("MSWC.Tools")
%>
<H3>Generating Unique Customer Passwords</H3>
<P>Between -32768 and 32767:
<B><%= oTools.Random %></B>
<P>Between 0 and 32767:
<B><%= (Abs(oTools.Random)) %></B>
<P>Between 0 an 99:
<B><%= (Abs(oTools.Random)) Mod 100 %></B>