loop though session

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron

    loop though session

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

  • Evertjan.

    #2
    Re: loop though session

    Aaron wrote on 27 okt 2003 in microsoft.publi c.inetserver.as p.general:
    [color=blue]
    > Is there a way I can loop through everything that is in session?[/color]

    <% For each d in Session.Content s %>
    <%=d%>
    =
    <%=Session.Cont ents(d)%>
    <br>
    <% Next %>


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Ray at

      #3
      Re: loop though session

      Dim ajs8ejfajshdfkl has734ur
      For Each ajs8ejfajshdfkl has734ur In Session.Content s
      Response.Write ajs8ejfajshdfkl has734ur & " = " &
      Session(ajs8ejf ajshdfklhas734u r) & "<br>"
      Next

      Ray at work

      "Aaron" <a@1.net> wrote in message
      news:u69aEbMnDH A.3700@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Is there a way I can loop through everything that is in session?
      >[/color]


      Comment

      • Aaron

        #4
        Re: loop though session

        thanks.

        Evertjan. wrote:[color=blue]
        > Aaron wrote on 27 okt 2003 in microsoft.publi c.inetserver.as p.general:
        >
        >[color=green]
        >>Is there a way I can loop through everything that is in session?[/color]
        >
        >
        > <% For each d in Session.Content s %>
        > <%=d%>
        > =
        > <%=Session.Cont ents(d)%>
        > <br>
        > <% Next %>
        >
        >[/color]

        Comment

        • Aaron

          #5
          Re: loop though session

          just wondering ... why ajs8ejfajshdfkl has734ur ???? ;)

          Ray at <%=sLocation% > wrote:
          [color=blue]
          > Dim ajs8ejfajshdfkl has734ur
          > For Each ajs8ejfajshdfkl has734ur In Session.Content s
          > Response.Write ajs8ejfajshdfkl has734ur & " = " &
          > Session(ajs8ejf ajshdfklhas734u r) & "<br>"
          > Next
          >
          > Ray at work
          >
          > "Aaron" <a@1.net> wrote in message
          > news:u69aEbMnDH A.3700@TK2MSFTN GP11.phx.gbl...
          >[color=green]
          >>Is there a way I can loop through everything that is in session?
          >>[/color]
          >
          >
          >[/color]

          Comment

          • Ray at

            #6
            Re: loop though session

            Ah, I'm just fed up with x, n, i, j, q, etc. ;]

            Ray at work

            "Aaron" <a@1.net> wrote in message
            news:eDVA%23jMn DHA.1408@TK2MSF TNGP11.phx.gbl. ..[color=blue]
            > just wondering ... why ajs8ejfajshdfkl has734ur ???? ;)
            >
            > Ray at <%=sLocation% > wrote:
            >[color=green]
            > > Dim ajs8ejfajshdfkl has734ur
            > > For Each ajs8ejfajshdfkl has734ur In Session.Content s
            > > Response.Write ajs8ejfajshdfkl has734ur & " = " &
            > > Session(ajs8ejf ajshdfklhas734u r) & "<br>"
            > > Next
            > >
            > > Ray at work
            > >
            > > "Aaron" <a@1.net> wrote in message
            > > news:u69aEbMnDH A.3700@TK2MSFTN GP11.phx.gbl...
            > >[color=darkred]
            > >>Is there a way I can loop through everything that is in session?
            > >>[/color]
            > >
            > >
            > >[/color]
            >[/color]


            Comment

            • Peter Foti

              #7
              Re: loop though session

              "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in message
              news:Xns9421D93 044C70eejj99@19 4.109.133.29...[color=blue]
              > Aaron wrote on 27 okt 2003 in microsoft.publi c.inetserver.as p.general:
              >[color=green]
              > > Is there a way I can loop through everything that is in session?[/color]
              >
              > <% For each d in Session.Content s %>
              > <%=d%>
              > =
              > <%=Session.Cont ents(d)%>
              > <br>
              > <% Next %>[/color]

              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




              Comment

              • Ray at

                #8
                Re: loop though session

                This isn't really an issue with IIS5 and higher.

                Ray at work

                "Peter Foti" <peterf@systoli cnetworks.com> wrote in message
                news:vpr25u1ck2 n40@corp.supern ews.com...[color=blue]
                >
                > Avoid this method, as it is unnecessarily inefficient. With the approach
                > above, the ASP interpretter will need to switch back and forth between[/color]
                HTML[color=blue]
                > and ASP. The other approaches posted don't.
                >[/color]


                Comment

                • Evertjan.

                  #9
                  Re: loop though session

                  Peter Foti wrote on 27 okt 2003 in
                  microsoft.publi c.inetserver.as p.general:
                  [color=blue]
                  > "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in message
                  > news:Xns9421D93 044C70eejj99@19 4.109.133.29...[color=green]
                  >> Aaron wrote on 27 okt 2003 in
                  >> microsoft.publi c.inetserver.as p.general:
                  >>[color=darkred]
                  >> > Is there a way I can loop through everything that is in session?[/color]
                  >>
                  >> <% For each d in Session.Content s %>
                  >> <%=d%>
                  >> =
                  >> <%=Session.Cont ents(d)%>
                  >> <br>
                  >> <% Next %>[/color]
                  >
                  > 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.[/color]

                  I agree it is inefficient in CPU time and before IIS 5. The searching for
                  an unknown sesssionvariabl e 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)

                  Comment

                  • Jason Chan

                    #10
                    Re: loop though session


                    "Ray at <%=sLocation% >" <myfirstname at lane34 dot com> ¼¶¼g©ó¶l¥ó
                    news:emDUGfMnDH A.964@TK2MSFTNG P10.phx.gbl...[color=blue]
                    > Dim ajs8ejfajshdfkl has734ur
                    > For Each ajs8ejfajshdfkl has734ur In Session.Content s
                    > Response.Write ajs8ejfajshdfkl has734ur & " = " &
                    > Session(ajs8ejf ajshdfklhas734u r) & "<br>"
                    > Next
                    >
                    > Ray at work
                    >
                    > "Aaron" <a@1.net> wrote in message
                    > news:u69aEbMnDH A.3700@TK2MSFTN GP11.phx.gbl...[color=green]
                    > > Is there a way I can loop through everything that is in session?
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    • Harag

                      #11
                      Re: loop though session


                      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.c om" 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><tit le></title><body>"
                      out "<table>"
                      out "<tr><th>he ad1</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:
                      [color=blue]
                      >This isn't really an issue with IIS5 and higher.
                      >
                      >Ray at work
                      >
                      >"Peter Foti" <peterf@systoli cnetworks.com> wrote in message
                      >news:vpr25u1ck 2n40@corp.super news.com...[color=green]
                      >>
                      >> Avoid this method, as it is unnecessarily inefficient. With the approach
                      >> above, the ASP interpretter will need to switch back and forth between[/color]
                      >HTML[color=green]
                      >> and ASP. The other approaches posted don't.
                      >>[/color]
                      >[/color]

                      Comment

                      • Ray at

                        #12
                        Re: loop though session


                        "Harag" <harag@softGETR IDOFCAPLETTERSh ome.net> wrote in message
                        news:dlespvktf1 2jja6htqvlbld14 voidqoas1@4ax.c om...[color=blue]
                        >
                        > Ray could you explain why its not an issue with iis5+ or at least
                        > point us to some urls exaplaining why.
                        >[/color]

                        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.

                        [color=blue]
                        > I was looking at a site called "coveryourasp.c om" 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.
                        >[/color]


                        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


                        Comment

                        Working...