473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

loop though session

Is there a way I can loop through everything that is in session?

Jul 19 '05 #1
11 4723
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 %>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Dim ajs8ejfajshdfklhas734ur
For Each ajs8ejfajshdfklhas734ur In Session.Contents
Response.Write ajs8ejfajshdfklhas734ur & " = " &
Session(ajs8ejfajshdfklhas734ur) & "<br>"
Next

Ray at work

"Aaron" <a@1.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Is there a way I can loop through everything that is in session?

Jul 19 '05 #3
thanks.

Evertjan. wrote:
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 %>


Jul 19 '05 #4
just wondering ... why ajs8ejfajshdfklhas734ur ???? ;)

Ray at <%=sLocation%> wrote:
Dim ajs8ejfajshdfklhas734ur
For Each ajs8ejfajshdfklhas734ur In Session.Contents
Response.Write ajs8ejfajshdfklhas734ur & " = " &
Session(ajs8ejfajshdfklhas734ur) & "<br>"
Next

Ray at work

"Aaron" <a@1.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Is there a way I can loop through everything that is in session?



Jul 19 '05 #5
Ah, I'm just fed up with x, n, i, j, q, etc. ;]

Ray at work

"Aaron" <a@1.net> wrote in message
news:eD****************@TK2MSFTNGP11.phx.gbl...
just wondering ... why ajs8ejfajshdfklhas734ur ???? ;)

Ray at <%=sLocation%> wrote:
Dim ajs8ejfajshdfklhas734ur
For Each ajs8ejfajshdfklhas734ur In Session.Contents
Response.Write ajs8ejfajshdfklhas734ur & " = " &
Session(ajs8ejfajshdfklhas734ur) & "<br>"
Next

Ray at work

"Aaron" <a@1.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Is there a way I can loop through everything that is in session?


Jul 19 '05 #6
"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.

Regards,
Peter Foti


Jul 19 '05 #7
This isn't really an issue with IIS5 and higher.

Ray at work

"Peter Foti" <pe****@systolicnetworks.com> wrote in message
news:vp***********@corp.supernews.com...

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.

Jul 19 '05 #8
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)
Jul 19 '05 #9

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> ¼¶¼g©ó¶l¥ó
news:em*************@TK2MSFTNGP10.phx.gbl...
Dim ajs8ejfajshdfklhas734ur
For Each ajs8ejfajshdfklhas734ur In Session.Contents
Response.Write ajs8ejfajshdfklhas734ur & " = " &
Session(ajs8ejfajshdfklhas734ur) & "<br>"
Next

Ray at work

"Aaron" <a@1.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Is there a way I can loop through everything that is in session?


Jul 19 '05 #10

Ray could you explain why its not an issue with iis5+ or at least
point us to some urls exaplaining why.

I was looking at a site called "coveryourasp.com" which says that
switching between asp & html is a bad thing and that he does his site
all using response.write (or a cutdown version called "Out", example
below)

What you think to this sort of design for the site? please take a look
at his and let me know your thoughts.

Al.

SUB out (sText)
response.write sText
END SUB

Out "<html><title></title><body>"
out "<table>"
out "<tr><th>head1</th><th>head2</th></tr>
out "<tr><td>1</td><td>2</td></tr>
out "<tr><td>1</td><td>2</td></tr>
out "<tr><td>1</td><td>2</td></tr>
out "</table>"
Out "</body></html>"

etc

On Mon, 27 Oct 2003 16:13:24 -0500, "Ray at <%=sLocation%>"
<myfirstname at lane34 dot com> wrote:
This isn't really an issue with IIS5 and higher.

Ray at work

"Peter Foti" <pe****@systolicnetworks.com> wrote in message
news:vp***********@corp.supernews.com...

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.


Jul 19 '05 #11

"Harag" <ha***@softGETRIDOFCAPLETTERShome.net> wrote in message
news:dl********************************@4ax.com...

Ray could you explain why its not an issue with iis5+ or at least
point us to some urls exaplaining why.

I don't have any links. This is just one of those things that I've heard
enough times that I've chosen to believe it. I do believe that I've seen
links about some differences betweeh IIS4 and 5 and why and how 5+ handles
things differently.

I was looking at a site called "coveryourasp.com" which says that
switching between asp & html is a bad thing and that he does his site
all using response.write (or a cutdown version called "Out", example
below)

What you think to this sort of design for the site? please take a look
at his and let me know your thoughts.

I like both ways. And I like to know [believe] that I can choose either way
without it mattering. I use both ways depending on the situation. If I
just need to response.write "<option>" & val & "</option>", I'll often
response.write it. But if I'm throwing asp vars into what is mostly html, I
will <%= %> it in the html.

Ray at work
Jul 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Colin Steadman | last post by:
I have created a function to kill all session variables that aren't in a safe list. This is the function - Sub PurgeSessionVariables For Each Item In Session.Contents Select Case Trim(Item)...
4
by: Ryan Liu | last post by:
How to loop though controls on the form? I set each control's TabStop and TabIndex, but at run time, I press Tab key, it jump though first control to last control and does not go back to the...
6
by: Roman | last post by:
Which is better when passing values between forms?
5
by: Oleg Ogurok | last post by:
Hi all, Is there a way to read other people's session variables? I understand it makes sense that session state is on per-user basis, but still... Is there a way to get a collection of all...
2
by: Peter | last post by:
Hi I have an application that opens a new form displaying an alert for every new alert the system receives. The code is running on a timer in a separate thread and all the alert forms are...
6
by: Stuart | last post by:
In VB6 I could cycle though loaded forms like this. Dim MyForm as Form For each MyForm in Forms debug.print MyForm.Name Next How can I do it in VB.NET?
2
by: Mike Walters | last post by:
I am trying to loop thought all the services on a system and stat/stop then as needed, I know How I can start or stop then, but how do I loop thought all installed services. Thanks Mike
1
by: Annie | last post by:
hi guys, I was just wondering if we can override the session timeout for some of the pages in a web application as defined in the web config? let is say i have a group of pages A, b, c, d that...
9
by: Robbe Morris - [MVP] C# | last post by:
For reasons I won't get into here, I'd be curious if anyone has tried to write an ASP.NET 2.0 site that could restrict the number of active sessions before disabling the application. By disable,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.