Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
II. Session object member overview
The Session object has more attributes than the Application object, namely, set, attribute, method, and event.
Set of reset Session objects
Contents: A set of all variables stored in a specific Session OBJECT defined by the <OBJECT> element.
StaticObject: a set of all variables defined by the <OBJECT> element stored in the Session OBJECT.
For example, the default. asp has the following values:
Session ("a") = ""
Session (& quot; B & quot;) = 128
Session ("c") = false
There is a contents set
Session. contents (1) = "a" 'can also be written as session. contents ("a") = ""
Session. contents (2) = 128 'can also be written as session. contents ("B") = 128
Session. contents (3) = false' can also be written as session. contents ("c") = false
Attributes of the reset Session object
CodePage: readable/writable. Integer. Defines the code page used to display page content in a browser. The code page is the numeric value of the character set. Different languages use different code pages. For example, the ANSI code page is 1252, the Japanese code page is 932, and the simplified Chinese code page is 936.
LCID: readable/writable. Integer. Defines the page area ID sent to the browser. LCID is an abbreviation of an international standard that uniquely identifies a region. For example, 2057 defines that the currency symbol of the current region is "currency ".
SessionID: Read-only. Long integer. Returns the session id of the current session. Each time a session is created, the server automatically assigns an identifier. You can determine who the two users first access the server based on their values.
Timeout: readable/writable. Integer. Defines the timeout limit in minutes for sessions. If the user does not refresh or request any webpage within this time period, the session generated by the user ends automatically. The default value is 20.
The above attributes do not play a major role in actual application, and basically do not need to be modified. These attributes are nothing special.
Restore Session object method
Contents. Remove ("variable name"): removes the specified variable from the Session. contents set.
Contents. Removeall (): deletes all variables in the Session. contents set.
Abandon (): ends the current user Session and revokes the current Session object.
Contents of the Session object. remove ("variable name") and Contents. the Removeall () method is basically the same as the Application object. For help, you can refer to the above example to change the Application to Session. The difference between Contents. Removeall () and Abandon () is described here. The execution of both methods will release the current
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.