Problem with storing object to Session

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
 
S

Saqismile

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top