Session

C

Celine

I am new to asp.net and C#. I was wondering if there is a way to store
an arraylist in a session.
Thank you
 
R

Rutger

Celine said:
I am new to asp.net and C#. I was wondering if there is a way to store
an arraylist in a session.
Thank you

You can store almost any objerct you want in a Session.
Remind that when you want to read back the session, you've got to cast
that thing back to a ArrayList.

//Rutger
 
S

Shiva

C#:
Session.Add ("arrlist", <arraylist var>);
<arraylist var> = (ArrayList) Session["arrlist"];

For VB.NET,
Session.Add ("arrlist", <arraylist var>)
<arraylist var> = CType(Session("arrlist"), ArrayList)

I am new to asp.net and C#. I was wondering if there is a way to store
an arraylist in a session.
Thank you
 

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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top