Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Server.WebServer
- WeOnlyDo.Server.WebHeader
- WeOnlyDo.Server.WebHeaders
- WeOnlyDo.Server.WebRequest
- WeOnlyDo.Server.WebResponse
- WeOnlyDo.Server.WebSessions
- WeOnlyDo.Server.WebSessionVar
- WeOnlyDo.Server.WebSessionVars
- WeOnlyDo.Server.WebUpload
- WeOnlyDo.Server.WebUploads
- WeOnlyDo.Server.WebUser
- WeOnlyDo.Server.WebUsers
- How to get support?
SessionVars property
Returns collection of session variables.
Type
WebSessionVars objectRemarks
This property holds reference to collection of all session variables set for the user. When at least one session variable is set, wodWebServer.NET will send cookie to the client on each response - waiting to find same same cookie sent back by the client on connections that follow. When such cookie is found, wodWebServer.NET will automatically return previously defined session variables through this property.Using session variables allows you do easily keep track of user's data during the session (session means more than one request/response). Usual usage is to ask user for login/password once, put it in session variables and then use in each subsequent connection (as long as session doesn't expire). Contents of session variables are never sent to the client - they are only known on the server side, and always kept in memory only.
Adding (and using) session variables is really easy - easy as User.SessionVars.Add("MyVar").Value = 5 or you can do something like this:
If User.SessionVars.Exists("MyCount") Then
User.SessionVars("MyCount") = User.SessionVars("MyCount") + 1
Else
User.SessionVars.Add("MyCount").Value = 1
End If
When no session variables for the user are defined, server does not send any cookies to the client.