First I am assigning a list values to Session like this
HttpContext.Session[cont + "schedule"] = objupload.schedule;
It is saving fine,
After that I want to retrieve the values from the session, then I am using this
objupload.schedule=HttpContext.Session[cont + "schedule"];
When I am using this, I am getting this error
‘Error Cannot implicitly convert type ‘object’ to ‘System.Collections.Generic.List’
My question is, ia casting possible for list conversion and is there any other solution for retrieving a value from the session?
You can typecast it, something like this should work.
here replace
SomeClasswith your class.Hope this helps.