Generation of Randon Numbers

Results 1 to 3 of 3

Thread: Generation of Randon Numbers

  1. #1
    Unni Krishnan Guest

    Default Generation of Randon Numbers

    How do i generate Random numbers in ASP.Is there any built in function ? Please do give me a methopd or function by which this can be acheived.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Generation of Randon Numbers

    Look at VBScript functions RANDOMIZE to seed the random generator and RND to generate a number.

  3. #3
    Join Date
    Dec 1969

    Default RE: Generation of Randon Numbers

    Use something like this:<BR><BR>&#060;%<BR>&#039Tell VBScript it get a randomizer seed (only ever do this once <BR>&#039per page!)<BR>Randomize<BR><BR>Dim MyVar<BR><BR>&#039Generate a number between 1-6 i.e. a roll of a dice!<BR>MyVar = Int(6 * Rnd + 1)<BR>%&#062;<BR><BR>Hope That Helps!<BR><BR>Pete<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts