Question
· Aug 16, 2016

CSP Session

Can anyone explain me how to create a dynamic session in CSP?

Discussion (3)0
Log in or sign up to continue

If you're talking about storing dynamic data along with the session, see the documentation on %session.Data. This is just a multidimensional property - so you can do something like:

Set %session.Data("hello","world")=15

And then reference that data in a request later in the same session.

For a more advanced approach - for example, if there's a large amount of data related to the session - you could use one or more tables instead, and clear data when appropriate by implementing OnEndSession in a subclass of %CSP.SessionEvents and configuring that class as the session events class for your web application (in the web application's security settings).