Session

  • Thread starter Thread starter Celine
  • Start date Start date
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
 
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
 
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

Back
Top