Lasso Soft Inc. > Home

[Session_Start]

[Session_Start] starts a new session or loads an exisiting session.

Initializes a session in the current page. If a session has not already been created for the current visitor then a new session is created, otherwise an existing session is loaded.

-Name is the name of the session which is to be started. Multiple named parameters can be used in the same page. The -Name given here must be used in all other [Session_...] tags which are used to manipulate this session.

-Expires is the expiration time for the session in minutes. The session will be automatically deleted after this many minutes of idle time.

The identifier for the named session can be propagated to other pages in the same site using either a -Session parameter added to HTML links or using a cookie. The -UseLink parameter specifies that all links to other pages in the same site should be modified automatically with a -Session command tag. The -UseCookie parameter specifies that a cookie should be created that identifies the session for the current visitor.

-UseNone can also be specified if neither method of propagating the session is desired. In this case the session ID must be propagated by the site designer using some other method. A manually propagated session ID can be passed into the [Session_Start] tag in the -ID parameter.

Variables can be added to the session using the [Session_AddVariable] tag. At the end of the current page the value of all the added variables will be stored in the current session. When the session is next recalled the value of the stored variable will be restored.

Once a variable has been added to a session its value will continue to be remembered on each page the session is loaded until a [Session_RemoveVariable] tag is called.

  • Syntax
  • Parameters
[Session_Start: -Name='Session Name',
  -Expires=Expires Minutes]

[Session_Start: -Name='Session Name',
  -Expires=Expires Minutes,
  -UseLink]

[Session_Start: -Name='Session Name',
  -Expires=Expires Minutes,
  -UseCookie,
  -UseLink]

[Session_Start: -Name='Session Name',
  -Expires=Expires Minutes,
  -UseNone,
  -ID='Session ID']
Required Parameters
-Name The name of the session to be started.
Optional Parameters
-Expires The number of minutes in which the session should expire. Defaults to 15.
-UseCookie If specified, the session will be tracked by cookie. The default is to track the session by cookie unless -UseLink or -UseNone is specified.
-UseLink If specified, the session will be tracked by automatically updating links on the current page.
-UseNone If specified, the session ID will not be propagated automatically.
-ID The ID of the session to be loaded. Required only if -UseNone is specified.
Examples

To start a server-side session:

Use the [Session_Start] tag. The following example creates a session named ShoppingCart and adds several variables to including TotalCost and TotalShipping.

[Session_Start: -Name='ShoppingCart', -Expires=1440, -UseCookie]
[Session_AddVariable: -Name='ShoppingCart', 'TotalCost']
[Session_AddVariable: -Name='ShoppingCart', 'TotalShipping']
Tag Link [Session_Start] Category Session
Type Process Data Source Any
Support Preferred Version 5.0
Output Type None Security None
Implementation Internal Sets Lasso 6.0, Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft