In-depth study of Application and Session objects (including global. asa) 2

Source: Internet
Author: User
Tags character set session id numeric value readable
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
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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.