Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > session variable problem

Reply
Thread Tools

session variable problem

 
 
Neil Jarman
Guest
Posts: n/a
 
      01-19-2005
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


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-19-2005
Neil Jarman wrote:
> 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
--
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.


 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      01-26-2005
<<
I need to create an array with a session variable.
>>


Here is a good resource for that:

Session Object
http://msdn.microsoft.com/library/de.../en-us/iissdk/
iis/ref_vbom_seso.asp

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System Session Variable VS. Own-declared 'Session' Variable chowchho ASP .Net 7 03-28-2008 02:38 PM
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
s there a way to set a session variable by session ID? admiller97@gmail.com ASP .Net 1 11-14-2005 05:13 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM



Advertisments