网站实例之间的可变生存时间 [英] Variable life time between instances of a website

查看:155
本文介绍了网站实例之间的可变生存时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过在每个相关页面中设置指向母版页的虚拟路径,我可以在母版页中设置要在整个网站中使用的变量(对于登录用户而言唯一).当我打开同一网站的第二个实例时,这些变量在那儿处于活动状态.我究竟做错了什么?

我在用户登录时从文件中读取数据一次,并且仅在用户更改数据时才再次打开文件.

我期望这些变量在客户端,但是它们看起来像在服务器上一样?我有可能.

我尝试过的事情:

我试图获取有关客户端数据的信息,但我很茫然.

hi i set variables (unique to the logged in user) in the master page to be used throughout the website by setting the virtual path to the master page in each relevant page. when i open a 2nd instance of the same website these variables are active there. what am i doing wrong?

i read the data from files once when the user logs in and only open the file/s again if the user changes the data.

i was expecting these variables to be on the client-side but they look like they are on the server? i this possible.

What I have tried:

i have attempted to source information regarding client-side data but i am at a loss.

推荐答案

听起来您正在使用所有用户共享的静态变量.如果需要每个用户的数据,则需要使用会话.

[ ^ ]
It sounds like you''re using static variables which all users share. If you want per-user data you need to use the Session.

[^]


这篇关于网站实例之间的可变生存时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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