I am not able to pass an array and integer from one page to other using sessions.I have done it as given below
FOR INTEGER
Session["Count"] = cnt;
int count = Session["Count"] //to recieve on 2nd form
FOR ARRAY
Session["Arr"] = arry // arry is a String Array
String [] arry = Session["Arr"];
Vipul KelkarPosted Mar 6, 2009, 10:09 AM
Vimal KandasamyPosted Mar 5, 2009, 11:28 PM
to pass a integer, you must convert it into string in the destination end. and you have to parse it.
like
int count = int.Parse( Session["Count"].ToString());
and up to my knowledge we cant pass a array directly.. we have to do some other arrangement to pass an array...
we can pass a session value based on index too..
like
Session[0]=arry[0];
Session[1]=arry[1];
Session[2]=arry[2];
try this...