经典 ASP 中的会话 [英] Session in classic ASP

查看:19
本文介绍了经典 ASP 中的会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用经典 ASP 开发一个项目,我想添加一些用户,例如临时列表,当我提交表单时,这些数据将保存到 DB.

我知道如何在 asp.net 中使用它,但在经典 asp 中不知道.

例如,是否可以创建用户列表并在会话中进行管理?

谢谢!

解决方案

是的,你可以使用这个,或者应用程序状态.请注意,您不能在其中保存对象,因此如果您想在其中存储任何复杂的东西,则需要进行一些序列化.

<上一页><代码>会话(用户名")=唐老鸭"会话(年龄")=50

http://www.w3schools.com/ASP/asp_sessions.asp

I'w working on a project in classic ASP and I want to add, for example, some users for a temporary list and when I submit the form, this data will be save to DB.

I know how to work with this in asp.net, but not in classic asp.

Is it possible to create lists of users, for example, and manage this in a session?

thanks!

解决方案

yesa, you can use this, or the application state. one thing do note, you cant save objects in it, so you'll need to do some serialization if you want to store any complex things in it.


Session("username")="Donald Duck"
Session("age")=50

http://www.w3schools.com/ASP/asp_sessions.asp

这篇关于经典 ASP 中的会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆