Dim _Customer as Customer
Session("Customer") = _Customer
Whenever you save an object to Session state, it is implicitly cast as
System.Object.
In order to get it back, you just explicitly cast it back to your object
type.
_Customer = CType(Session("Customer"), Customer)
Here is an article that may help:
http://www.codeproject.com/dotnet/Ch...CastingNET.asp
This article touches on 'Option Strict' which you can set to force VB to be
strictly-typed. It is good to get in the habit of turning Option Strict ON
(not the default for VB).
Good luck!
--
Message posted via
http://www.dotnetmonster.com