D
dana lees
Hello,
I am using session variables in a cs class file. I am inserting a sortedList
to a session variable like this:
System.Web.HttpContext.Current.Session["EventsList"] = EventsSortedList;
Later on, when i want to use this value by:
EventsSortedList =
(SortedList)System.Web.HttpContext.Current.Session["EventsList"];
i get an error "Specified cast is not valid". When debugging i see that the
value entered to the session is a string and not a sortedArray.
What am i doing wrong?
Thanks,
Dana
I am using session variables in a cs class file. I am inserting a sortedList
to a session variable like this:
System.Web.HttpContext.Current.Session["EventsList"] = EventsSortedList;
Later on, when i want to use this value by:
EventsSortedList =
(SortedList)System.Web.HttpContext.Current.Session["EventsList"];
i get an error "Specified cast is not valid". When debugging i see that the
value entered to the session is a string and not a sortedArray.
What am i doing wrong?
Thanks,
Dana