<%
Application.lock
Application("aa")=123
Application.unlock
%>
运行完之后在其他任何asp中<%=Application("aa")%>
</慕白兄>
Application.lock
Application("aa")=123
Application.unlock
%>
运行完之后在其他任何asp中<%=Application("aa")%>
</慕白兄>
<%
'Creating and initializing the array
dim MyArray()
Redim MyArray(5)
MyArray(0) = "hello"
MyArray(1) = "some other string"'Storing the array in the Application object
Application.Lock
Application("StoredArray") = MyArray
Application.UnlockResponse.Redirect("file2.asp")
%>---file2.asp---
<%
'Retrieving the array from the Application Object
'and modifying its second element
LocalArray = Application("StoredArray")
LocalArray(1) = " there"'printing out the string "hello there"
Response.Write(LocalArray(0)&LocalArray(1))'Re-storing the array in the Application object
'This overwrites the values in StoredArray with the new values
Application.Lock
Application("StoredArray") = LocalArray
Application.Unlock
%>