session variable problem

N

Neil Jarman

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.QueryString
if left(key,6) = "cboRun" then
iIndex = cint(mid (key,7))
response.Write(iIndex & "<br>")
session.Contents("iRunNo")(iIndex)=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
 
B

Bob Barrows [MVP]

Neil said:
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.QueryString
if left(key,6) = "cboRun" then
iIndex = cint(mid (key,7))
response.Write(iIndex & "<br>")
session.Contents("iRunNo")(iIndex)=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

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

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top