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
 
Back
Top