Results 1 to 2 of 2

Thread: Session Object

  1. #1

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Question

    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

  2. #2
    Lively Member
    Join Date
    Aug 1999
    Posts
    89
    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...

Posting Permissions

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



Click Here to Expand Forum to Full Width