Results 1 to 6 of 6

Thread: Session variables - PLEASE!!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry

    Hello,

    Can someone please tell me how to "write" and "read"
    to/from a session variable.

    IE. I need to know how to store something in it and then retrieve that which I stored from it.

    Please help,
    T

  2. #2
    Addicted Member
    Join Date
    Nov 2000
    Location
    UK
    Posts
    164
    session("myvariable")="test ok"
    response.write session("myvariable")
    ASP, SQL, VB6, Java Script and dubious guitar playing skills.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry

    Thanks Alex,

    I must be doing something wrong!!

    I copied and pasted your code and created a variable
    myvariable....

    Dim myvariable

    When I try to run the code I get the error......

    Microsoft VBScript runtime error '800a01f4'
    Variable is undefined: 'session'

    Thanks,
    T

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    That's strange

    Do you include the directive "EnableSessionState=False" at the beginning of your ASP page? If so, remove it

    Do you have sessions enabled in the config of your web app (check using the IIS manager)?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Hey Tom,

    Jip, that's what the problem was - EnableSessionState=False!!

    Thanks,
    T

  6. #6
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Thumbs up


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