Back to product page

Add method


Adds new session variable to the collection.

Type

WebSessionVar object

Syntax

  • C#
  • VB.NET
WebSessionVar Add(String Name);
The Add(Name) syntax has these parts:
NameA String value. Represents new session variable name.

WebSessionVar Add(String Name, Object Value);
The Add(Name,Value) syntax has these parts:
NameA String value. Represents new session variable name.
ValueSpecifies session variable value.

Function Add(ByVal Name As String) As WebSessionVar
The Add(Name) syntax has these parts:
NameA String value. Represents new session variable name.

Function Add(ByVal Name As String, ByVal Value As Object) As WebSessionVar
The Add(Name,Value) syntax has these parts:
NameA String value. Represents new session variable name.
ValueSpecifies session variable value.

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
 


Platforms

Windows