Back to product page

Add method


Adds new session variable to the collection.

Type

WebSession object

Syntax

  • Basic
object.Add (Name, [Value])
The Add(object,Name,Value) syntax has these parts:
objectAn expression evaluating to an object of type WebSessions
NameA String value. Represents session variable name.
ValueA Variant value. Specifies session variable value (or reference to some object).
Return valueWebSession object

Remarks

Add method is used to add new session variable to the collection, for the user. You can use it like this:
 
User.SessionVars.Add("MyCount").Value = 5
 

or, you can completely omit 'Add' keyword and do this
 
User.SessionVars("MyCount") = 5
 


Platforms

Windows