text: how to get a random number in asp.net? how to get a random number in asp.net when you are going for a random number always remember that the computer does not generate truly random numbers. it simply uses an set structure to pick them. to make the number seem more random, just remember that the odds of selecting the random number at the same time is virutally impossible. therefore for truly random numbers try this in c#  random rand = new random(datetime.now.millisecond); //millisecond is the seed value. //then if you want to select from a range, enter it like this: int num = rand.next(minvalue, maxvalue);  //to select a number between 0 and a max value use this: int num1 = rand.next(maxvalue);  //to select any random number, use this: int num2 = rand.next();  if you are using vb, just make sure to use the seed and everything else is pretty much the same. good luck!