Results 1 to 2 of 2

Thread: session.contents

  1. #1
    Join Date
    Dec 1969

    Default session.contents

    hi, <BR>i want to write all names of the users from the session.contents, however this doesnt seem to work..<BR><BR>&#060;%<BR>for i = 1 to session.contents.count<BR>response.write session.contents(i) & "<BR>"<BR>next<BR>%&#062;<BR><BR>what&#039;s wrong with it?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: session.contents

    What did you get when you tried that???<BR><BR>And what do you mean "all names of the users"??? Are you expecting to see the session values from sessions other than the current one? Never happen!<BR><BR>But if you mean it&#039;s simply a problem with the looping not working, as written...<BR><BR>I never tried what you are trying, but I&#039;d bet that this might work:<BR><BR>&#060;%<BR>For Each key In Session.Contents<BR>&nbsp; &nbsp; Response.Write key & ": " & Session.Contents(key) & "&lt;BR&#062;"<BR>Next<BR>%&#062;<BR><BR>"key" is an arbitrary name. Use any name you like.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts