Asp classic 启动ASP会话
我正在使用ASP开发一个需要会话控制的系统。使用ASP启动和检索会话值的语法是什么?在有人因为没有使用Google而对您大喊大叫之前,请首先查看下面的链接 语法:Asp classic 启动ASP会话,asp-classic,Asp Classic,我正在使用ASP开发一个需要会话控制的系统。使用ASP启动和检索会话值的语法是什么?在有人因为没有使用Google而对您大喊大叫之前,请首先查看下面的链接 语法: <% Session[.collection|property|method|event] %> 范例 <% Option Explicit %> <html> <head> <title>First Page</title> </head> &
<% Session[.collection|property|method|event] %>
范例
<% Option Explicit %>
<html>
<head>
<title>First Page</title>
</head>
<body>
<%
Session.TimeOut = 60
Session("SiteName") = "www.example.com"
Session("Name") = "Mr.Incredible"
Response.write("Session Created<br><br>")
Response.write("<a href=redirect.asp>Check Session</a>")
%>
</body>
</html>
首页
重定向页面:
<% Option Explicit %>
<html>
<head>
<title>Redirect Page</title>
</head>
<body>
<%
Response.write "Site Name = " & Session("SiteName") & "<br>"
Response.write "Name = " & Session("Name")& "<br><br>"
%>
</body>
</html>
重定向页面
查看ASP.NET状态管理概述-。这可能是你的出发点。另外,请查看ASP.NET会话状态概述-
Session("name") = "something" //storing value in session
something = Session("name") //retrieving value from session