I want to know how to declare arraylist in one page and also i want to know how to retrieve that data's from the array list from one page to another page.
Thanks in advance
Declare and retrive data from arraylist
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Gaurish Kumar108 reputationPosted Jan 20, 2010, 6:42 PM EST
You can't directly pass arraylist to another page.
but you can do this by using the session object. store whole array in session object and access that arraylist from session object in another
page. like that
ArrayList myArray = new ArrayList();
myArray .Add("hello world");
Session["Data"] = myArray ; //Add the data to session.
On subsequent pages when you need the data, do this:
ArrayList retrievedData (ArrayList)Session["Data"];
Hope it's help you.
Raunak Jhawar51 reputationPosted Jan 20, 2010, 6:37 PM EST
A similar post was answered by Nikhil and myself.
You should instantiate an object of form2 on form1
Pass relevant objects as deemwed necessary and call the parameterized constructor of form2 on form2.cs