Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Randomization Function?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

denny
Starting Member

15 Posts

Posted - 15 July 2001 :  19:31:41  Show Profile
Is there a function in ASP that can generate and return a random number?
I know there is one but I just can't figure out what it is.


Gracias =)

______________
ProstheticHead

Edited by - denny on 15 July 2001 19:32:08

Doug G
Support Moderator

USA
6493 Posts

Posted - 15 July 2001 :  22:32:17  Show Profile
Look at the Randomize and Rnd functions. Details can be found at http://msdn.microsoft.com/scripting

======
Doug G
======
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 16 July 2001 :  09:29:08  Show Profile  Visit gor's Homepage
Here is what we use to randomly display different banner:

<%
Randomize

intBannerID = Int(rnd * 6)

Select case intBannerID
case 1,2
%>
<!-- add bannercode here -->
<%
case else
%>
<!-- add bannercode here -->
<%
end select
%>


In this case the second banner is displayed twice as often as the first.


Pierre
Join the Snitz WebRing
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07