display random numbers in asp

by Ramya 2010-01-29 08:26:09

display random numbers in asp:

To display random numbers in asp use Randomize rnd().
Rnd() - Returns a random number.
<%
Dim my_num
Randomize
my_num = Int((rnd*5))+1
Response.Write my_num
%>


Output:
4

Make sure to add Randomize() statement without an argument or simply Randomize.Razz

Tagged in:

865
like
0
dislike
0
mail
flag

You must LOGIN to add comments