PDA

Click to See Complete Forum and Search --> : Session Object


ShIzO
May 3rd, 2000, 07:52 PM
Hello,

do you guys have any clue how to retrieve the name of any session variable?

Session("TestVar") = "My Name"

i did:

for every strItem in Session.Contents
myName = Session(strItem)

'this works
Response.Write strItem

'this does't, myName is null, can't compare
if myName = "TestVar" then Response.Write "Got Ya"

next

how do i get the name the name? so i can do some string manipulation, it works when displaying but doesn't when comparing and manipulating.

thx. please help

lychew
May 4th, 2000, 11:01 AM
You have mixed up the myName variable.
When you do
myName=session(stritem)
the myName should be the content of the session. So...

myName="My Name" instead of "TestVar"

So your comparison statement is wrong. That's why it won't write out got it...