Forums

ASP

This topic is locked

Creating a random number

Posted 03 Sep 2001 13:29:23
1
has voted
03 Sep 2001 13:29:23 Bec C posted:
Does anybody have a piece of code that generates random numbers e.g.


001030402


Anything would be of help though!

Thanks

Replies

Replied 06 Sep 2001 02:08:51
06 Sep 2001 02:08:51 Waldo Smeets replied:
<%
Dim myNum
Randomize
myNum = Int((1000 * Rnd) + 1)
%>

Then use "myNum" in your code as your random number variable.

Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic