Sub Application_OnStart
Application ("VI") = "Www.111cn.net"
Application ("UID") =2
End Sub
' The above code is to create the application variable
Response.Write (Application ("VI")) ' Output value www.111cn.net
' Above is the value of reading the application variable
The ' Traversal Contents collection Contents collection contains all the application variables. We can iterate through the contents collection to see where the stored
Dim i
Dim j
J=application.contents.count
For I=1 to J
Response.Write (Application.Contents (i) & "<br/>")
Next
' Traversal Contents set Contents Method II
Dim i
For all I in application.contents
Response.Write (I & "<br/>")
Next
' One of the most important things in the ASP application is the lock and unlock, which is used to do the online numbers.
Application.Lock
Application ("url") = "http://www.111cn.net";
Application.UnLock
' Annotated, this article original in www.111cn.net reprint to indicate the origin