tags:

views:

148

answers:

1

I have some arraylists in a page which I need to access in a Class file. How can I get these Arraylists in the class file??

A: 

Assumming that this class file you are talking about is a code behind file then you can use the Session object almost like an array and cram something in there.

Session["MyArrayList"] = new ArrayList();

and retrieve using the same

tmpArrayList = (ArrayList)Session["MyArrayList"];

on another page.

uriDium