<% Randomize %>
<%=Rnd() %> |
Output : 0.829159 |
|
- Rnd() will create a randon number between 0 and 1.
- In case we need to get more randon numbers, we must execute "Randomize" command again,
otherway we will get the same result several time
|
Geting a three digits integer randon number |
<% Randomize %>
<% =INT(Rnd ()*1000) %> |
Output : 746 |
Geting a six digits integer randon number |
<% Randomize %>
<% =INT(Rnd ()*1000000) %> |
Output: 526036 |
Asp Include page |
The File Keyword |
<!--#include file="header.asp"--> |
The Virtual Keyword |
<!-- #include virtual ="/html/header.inc" -->` |
The Global.asa file |
The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every page in an ASP application. All valid browser scripts (JavaScript, VBScript, JScript, PerlScript, etc.) can be used within Global.asa. |
The Global.asa file can contain only the following:
- Application events
- Session events
- <object> declarations
- TypeLibrary declarations
- the #include directive
|
Note: The Global.asa file must be stored in the root directory of the ASP application, and each application can only have one Global.asa file. |
<script language="vbscript" runat="server">sub Application_OnStart
'some code
end subsub Application_OnEnd
'some code
end subsub Session_OnStart
'some code
end subsub Session_OnEnd
'some code
end sub</script> |
|