Peter Foti wrote on 27 okt 2003 in
microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29... Aaron wrote on 27 okt 2003 in
microsoft.public.inetserver.asp.general:
> Is there a way I can loop through everything that is in session?
<% For each d in Session.Contents %>
<%=d%>
=
<%=Session.Contents(d)%>
<br>
<% Next %>
Avoid this method, as it is unnecessarily inefficient. With the
approach above, the ASP interpretter will need to switch back and
forth between HTML and ASP. The other approaches posted don't.
I agree it is inefficient in CPU time and before IIS 5. The searching for
an unknown sesssionvariable name as such is terribly inefficient, as you
should know that in your own environment. If you get an unknown session
variable, how the hell would you know what to do with it, code wise?
But it is very efficient educational wise,
as, in my view, it is much easier to see the code flow
than with response.write and lots of &&& and """.
And as this code will probably only be used in an debugging environment,
the cpu efficiency is rather or rather completely unimportant.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)