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)
 Global.asa ?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

wedont
Junior Member

Canada
344 Posts

Posted - 24 July 2001 :  16:05:57  Show Profile
In the following file:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server"> 
Sub Application_OnStart
End Sub

Sub Application_OnEnd
End Sub

Sub Session_OnStart
session("ad")=0
End Sub

Sub Session_OnEnd
End Sub

</SCRIPT>


Instead of: session("ad")=0
How can I make it
session("ad")= a random number between 0 and 10 ?

Thanks

Wedont
snitz ver3.1 sr2
access 2k.

Id
Junior Member

USA
129 Posts

Posted - 24 July 2001 :  16:19:25  Show Profile  Visit Id's Homepage
http://msdn.microsoft.com/scripting/vbscript/doc/vsfctRnd.htm

this aughta be helpful

Go to Top of Page

Cyber Paladin
New Member

55 Posts

Posted - 25 July 2001 :  13:28:08  Show Profile  Visit Cyber Paladin's Homepage
Sub Session_OnStart
dim RandNum
Randomize Timer
RandNum = int((RND * 10) + 1)
session("ad") = RandNum
End Sub

Go to Top of Page

wedont
Junior Member

Canada
344 Posts

Posted - 25 July 2001 :  15:52:02  Show Profile
Thanks Cyber Paladin !

and Thanks ID for your concerned!

Wedont
snitz ver3.1 sr2
access 2k.
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.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07