ASP Tutorial: A brief introduction to ASP Session Object
The session object is used to store information, or to change settings for a user meeting. Variables stored in the Session object hold information to a single user and are provided to all Web pages in an application.
Let's look at a simple example.
<body>
<%
Response.Write ("<p>")
Response.Write ("The default LCID for this page:" & session.lcid & "<br/>")
Response.Write ("The date format for the above LCID is:" & Date () & "<br/>")
Response.Write ("The Currency format for the above LCID is:" & FormatCurrency (350))
Response.Write ("</p>")
session.lcid=1036
Response.Write ("<p>")
Response.Write ("The LCID is now changed to:" & Session.LCID & "<br/>")
Response.Write ("The date format for the above LCID is:" & Date () & "<br/>")
Response.Write ("The Currency format for the above LCID is:" & FormatCurrency (350))
Response.Write ("</p>")
Session.LCID = 3079
Response.Write ("<p>")
Response.Write ("The LCID is now changed to:" & Session.LCID & "<br/>")
Response.Write ("The date format for the above LCID is:" & Date () & "<br/>")
Response.Write ("The Currency format for the above LCID is:" & FormatCurrency (350))
Response.Write ("</p>")
Session.LCID = 2057
Response.Write ("<p>")
Response.Write ("The LCID is now changed to:" & Session.LCID & "<br/>")
Response.Write ("The date format for the above LCID is:" & Date () & "<br/>")
Response.Write ("The Currency format for the above LCID is:" & FormatCurrency (350))
Response.Write ("</p>")
%>
</body>
The result of the output is.
The default LCID for this page is:1033
The Date format for the above LCID is:10/31/2008
The Currency format for the above LCID is: $350.00
The LCID is now changed to:1036
The Date format for the above LCID is:31/10/2008
The Currency format for the above LCID is:350,00€
The LCID is now changed to:3079
The Date format for the above LCID is:31.10.2008
The Currency format for the above LCID is:€350,00
The LCID is now changed to:2057
The Date format for the above LCID is:31/10/2008
The Currency format for the above LCID is:? 50.00
Reprint please indicate from http://www.111cn.net/asp/asp.html