asp教程:ASP Session 对象简单简介
asp教程:ASP Session 对象简单简介
Session对象是用来储存的信息,或更改设置的一个用户会议。变量存储在Session对象举办资讯单一用户,并提供给所有的网页在一个应用程序。
下面来看一个简单的实例吧.
<html>
<body>
<%
response.write("<p>")
response.write("The default LCID for this page is: " & 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>
</html>
输出的结果为.
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.226500.cn/asp/asp.html
补充:asp教程,ASP入门