Save Information in a Session Variable

You can save the value of any textbox, label, literal or dropdown control into a session variable. Note that session variables are valid only for the current session, and sessions are recycled when a user logs out, as well as when the Microsoft Internet Information Server (IIS) reaches certain thresholds as specified by the administrator. 

In the example below, the MyCustomerID session variable is set to the value of a literal control.

Step 1:  In the Layout Editor, select a control and open the Property Sheet, Actions group.

Step 2:  Select the ‘Save into Session variable’ event and enter a formula, e.g.:

= CustomersRecordControl.CustomerID.Text


Step 3:  Build and run the application.

When saving data into a session variable from a web page, the data can be retrieved from textbox, label or literal controls; or from the database table.  An alternative formula for the session variable is:

= CustomerID

CustomerID refers to the database field for the current customer record.

See Also

Common Formula Examples