SetValue

Description

Sets the value of a session variable.

Applies to

PSSessionClass object

Syntax

psSession.SetValue( propname, value )

Argument

Description

propname

The name of a session variable

value

The new value for the session variable

Returns

String. Returns the new value for the session variable.

Usage

At runtime, SetValue has the following behavior:

Application server

Runtime behavior

ASP

Assigns a value to a user-defined property of the Session object

JSP

Assigns a value to a user-defined property of the session object

Examples

Example 1

The following example sets the value of the UserID and Password session variables:

psSession.SetValue("UserID", userid);
psSession.SetValue("Password", password);