Lasso Soft Inc. > Home

[Session_Start]

[Session_Start] starts a new session or loads an exisiting session. Accepts four parameters: -Name is the name of the session to be started, -Expires is the idle timeout of the session in minutes, -UseCookie specifies that the session ID should be propagated using a cookie, -UseLink specifies that the session ID should be propagated by modifying all the links in the current format file.

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.

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]
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 is specified.
-UseLink If specified the session will be tracked by link.
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 Sets 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