一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp教程:ASP Session 对象简单简介

时间:2022-07-02 22:41:44 编辑:袖梨 来源:一聚教程网

asp教程:ASP Session 对象简单简介

Session对象是用来储存的信息,或更改设置的一个用户会议。变量存储在Session对象举办资讯单一用户,并提供给所有的网页在一个应用程序。

下面来看一个简单的实例吧.

 

<% 
response.write("

")
response.write("The default LCID for this page is: " & Session.LCID & "
")
response.write("The Date format for the above LCID is: " & date() & "
")
response.write("The Currency format for the above LCID is: " & FormatCurrency(350))
response.write("

")

Session.LCID=1036

response.write("

")
response.write("The LCID is now changed to: " & Session.LCID & "
")
response.write("The Date format for the above LCID is: " & date() & "
")
response.write("The Currency format for the above LCID is: " & FormatCurrency(350))
response.write("

")

Session.LCID = 3079

response.write("

")
response.write("The LCID is now changed to: " & Session.LCID & "
")
response.write("The Date format for the above LCID is: " & date() & "
")
response.write("The Currency format for the above LCID is: " & FormatCurrency(350))
response.write("

")

Session.LCID = 2057

response.write("

")
response.write("The LCID is now changed to: " & Session.LCID & "
")
response.write("The Date format for the above LCID is: " & date() & "
")
response.write("The Currency format for the above LCID is: " & FormatCurrency(350))
response.write("

")
%>


输出的结果为.

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
转载请注明来自http://www.111com.net/asp/asp.html

热门栏目