如何取得所有的Session变量 在程序调试中,有时候需要知道有多少Session变量在使用,她们的值如何?由于Session对象提供一个称为Contents的集合(Collection),我们可以通过For...Each循环来达到目标: Dim strName, iLoopFor Each strName in Session.ContentsResponse.Write strName & - & Session.Contents(strName)& <BR> Next 一般情况下,上面的代码可以工作得很好。但当Session变量是一个对象或者数组时,打印的结果就不正确了。 这样我们修改代码如下: '首先看看有多少Session变量在使用? Response.Write There are & Session.Contents.Count & ...
查看详细内容 >>