Problem with storing object to Session

  • Thread starter Thread starter Morten Snedker
  • Start date Start date
M

Morten Snedker

Dynamicweb.eCommerce.Orders.OrderLineCollection olc = new
Dynamicweb.eCommerce.Orders.OrderLineCollection();

...some code that puts data to the olc variable..

HttpContext.Current.Session["OrderLineCollectionOfPresaleProducts"] = olc;

This last line produces:
Conversion from type 'OrderLineCollection' to type 'String' is not valid.

But isn't Session supposed to take any object?

Where am I going wrong?

Regards
Morten Snedker
 
During postback , session is going to be null that why object is getting null
plz check your whole page life cycle.
 
Back
Top