June 2002
Intermediate to advanced
816 pages
28h 12m
English
Set
Application.Set(ByVal name As String, ByVal value As Object)
Updates the value of an object in the Application collection. This new method allows you to set objects in the Application collection.
Name
A String argument containing the name of the object in the Application collection to be updated.
Value
An Object argument containing the new value of the Application collection object to be updated.
The example uses Set twice -- once to set a new item in the Application collection and again to change that value.
Sub Page_Load( )
Application.RemoveAll( )
Application.Set("TotallyNewVariable","Test!")
Message.Text = "First: " + Application("TotallyNewVariable") + "<br/>"
Application.Set("TotallyNewVariable","Test again!")
Message.Text = Message.Text & "First after Set: " +
Application("TotallyNewVariable") + "<br/>"
End SubSet can be used to add values to the Application collection, but you will normally just use the simple syntax you are used to from classic ASP:
Application("TotallyNewVariable") = "Test!"Read now
Unlock full access