No i get a differant Random number each time i refresh/Run the application, but it always repeats inside the loop...
I changed it to a higher number, but that just gave me a Long list of same numbers...
Im thinking that the loop is processing far to quickly for the randomnumber function to return somthing differant off the clock.
Does anyone know if the process like in ASP Classic would work Somthing...
User Profile
Collapse
-
Random Number in Asp.net
Im trying to generate a random number in a loop in order to build a random array of values. problemAmt is being passed in as 10.
This is my code.
Dim Questions As New ArrayList()
For i = 0 To problemAmt - 1
Dim RandomGenerator = New Random()
Dim intRandomNumber = RandomGenerator .Next(0, problemAmt)
Response.Write( "RandomNumb er=" &...
No activity results to display
Show More
Leave a comment: