This is a small ASP function that will return a random number between two numbers. It will takes two numbers (maximum & minimum) numbers and generate a random number within that range. It will geenrate a random number every time the function is called. Quite handy function for general purpose use where a random number is needed in ASP.

‘* MYCPLUS Sample Code – *
‘* *
‘* This code is made available as a service to our *
‘* visitors and is provided strictly for the *
‘* purpose of illustration. *
‘* *
‘* Please direct all inquiries to saqib at *

‘Function to Return a Random number with in a range

Public Function RandomNumber(MaxValue,MinValue )

On Error Resume Next
Randomize Timer
RandomNumber = Int((MaxValue – MinValue + 1) * Rnd) + MinValue

End Function