Ok I have an employee object that I want to store in a Session variable:
Session("myEmployee") = New myNs.employee()
how do I go about changing the properties or calling methods from this object once its in a Session?
set property guess:
Session("myEmployee").firstName = "Darin"
call method guess:
Session("myEmployee").makeAngry("byPestering")I think you'll have to use DirectCast or CType, so the compiler knows what type of Object you're dealing with.For example:
DirectCast(Session("myEmployee"), myNs.employee).firstName = "Darin"
or
CType(Session("myEmployee"), myNs.employee).firstName = "Darin"
Session("myEmployee") = New myNs.employee()
how do I go about changing the properties or calling methods from this object once its in a Session?
set property guess:
Session("myEmployee").firstName = "Darin"
call method guess:
Session("myEmployee").makeAngry("byPestering")I think you'll have to use DirectCast or CType, so the compiler knows what type of Object you're dealing with.For example:
DirectCast(Session("myEmployee"), myNs.employee).firstName = "Darin"
or
CType(Session("myEmployee"), myNs.employee).firstName = "Darin"