session variable problem

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

    session variable problem

    Hi,

    I need to create an array with a session variable.

    According to my book, the following should work,. but if fails

    for each key in request.QuerySt ring
    if left(key,6) = "cboRun" then
    iIndex = cint(mid (key,7))
    response.Write( iIndex & "<br>")
    session.Content s("iRunNo")(iIn dex)=iIndex
    end if
    next

    it is the (iIndex) part which fails. If I remove this, then I can create a
    single session variable

    Any suggestions where I'm going wrong.

    Many thansk

    NEIL


  • Bob Barrows [MVP]

    #2
    Re: session variable problem

    Neil Jarman wrote:[color=blue]
    > Hi,
    >
    > I need to create an array with a session variable.
    >
    > According to my book, the following should work,. but if fails
    >
    > for each key in request.QuerySt ring
    > if left(key,6) = "cboRun" then
    > iIndex = cint(mid (key,7))
    > response.Write( iIndex & "<br>")
    > session.Content s("iRunNo")(iIn dex)=iIndex
    > end if
    > next
    >
    > it is the (iIndex) part which fails. If I remove this, then I can
    > create a single session variable
    >
    > Any suggestions where I'm going wrong.
    >
    > Many thansk
    >
    > NEIL[/color]

    I don't see the code where you initialized the session variable. Does it
    exist?

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Comment

    • Bullschmidt

      #3
      Re: session variable problem

      <<
      I need to create an array with a session variable.[color=blue][color=green]
      >>[/color][/color]

      Here is a good resource for that:

      Session Object

      iis/ref_vbom_seso.a sp

      Best regards,
      J. Paul Schmidt, Freelance ASP Web Developer
      Do you have an idea for a database on the Web? Hi! I'm a freelance Web and/or database developer who can make database information available 'live' on the Web.

      ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...