This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 请教: 用ASP , 如何实现, for instance , 论坛的当前在线人数,并列出所有当前在线的用户名?能把Dictionary Object 存在Application 里吗?MSDN好像说不行呀.怎么办?
-redmouthbird(Everything but girl);
2003-1-11
(#969803@0)
-
Top
-redmouthbird(Everything but girl);
2003-1-11
(#969809@0)
-
up
-redmouthbird(Everything but girl);
2003-1-11
(#969874@0)
-
肯定可以,到GOOGLE上SEARCH一下“在线为数统计”就可以发现有很多种方法
-benbendan(笨笨蛋);
2003-1-11
(#969881@0)
-
asp 不熟,不知道啥叫dictionary obj. 不过你建一个表,每登陆一个用户加条纪录,需要列用户时select 一下不就行了吗?
-jackcat(wangwang);
2003-1-11
(#969883@0)
-
在线人数的例子见内,我想同样的方法也可以存用户名。据说Session_OnEnd有时会不工作。
-hillxie(路在脚下);
2003-1-11
{786}
(#969894@0)
-
Thanks . It's simple and straight forward to measure the overall # online like this . But , how to store the unduplicate usernames into the Application object ? The bestway is to store HASH to Application . That
s what I'm concerned most . Any idea ?
-redmouthbird(Everything but girl);
2003-1-11
{84}
(#969915@0)
-
你这个有问题,人家还要“列出所有当前在线的用户名”,所以最好还是在Application_Onstart中再开一个大的Application数组来存用户,每次用户登录时,先CHECK,再把用户名加入列表。
-benbendan(笨笨蛋);
2003-1-11
(#969945@0)
-
这段代码不知道能不能WORK,我没试过。Set oDict = CreateObject("Scripting.Dictionary")
'--
'-- Add items in the dictionary...
'--
Application("DICT") = Array(oDict)
Then, when you need the object you can do like this:
Set oDict = Application("Dict")(0)
-hillxie(路在脚下);
2003-1-11
{243}
(#969971@0)