Well, I'm not sure, but...
In Visual Studio, I find that the "rnd()" fucntion has 0 or 1 arguments, not 2. And it doesn't have a ".Next" method because it isn't an object. And my VS.NET help facility says "Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator..."
But if you're passing 2 arguments and using ".Next", then you must be using the Random object. In which case you have to create a Random object with the constructor and then apply .Next to it.
If you're creating a new instance of Random each time, "if your application runs on a fast computer the system clock might not have time to change between invocations of theis constructor; the seed value might be the same for different instances of Random."
With the following code:
Dim i as integer, j(999) as integer
Dim x as random = new random
for i=0 to 999
j(i)=x.Next(1000000000,2000000000)
next i
I find that I get 1000 unique numbers. This is running on a fairly fast (2GHz) machine.
If this doesn't help, maybe you need to post more of your ASPX code.
-Van
(Old dog learning new tricks...)
|