Y
yurps
Hello I have an Employee object which is serializable and has a
generictypeconverter to enable the object to be stored in the asp.net
session....
In my code I am calling procedures by casting the session into the
object and getting properties from it...
UpdateDataBase(
((Employee)Session["EMPLOYEE"]).EmpId,((Employee)Session["EMPLOYEE"]).DeptId
)
It appears that some of these properties are coming out as null even
though they have been set..I can tell because I have place a catch code
which then uses reflection to get the properties of the object.
So I do
if ( ((Employee)Session["EMPLOYEE"]).EmpId == 0 )
ReflectSessionObject();
And I can see that the .EmpId property does have a value...I default it
to zero if it is null....
Does anyone have any recommendations about this kind of coding...?
Thanks,
MAtt
generictypeconverter to enable the object to be stored in the asp.net
session....
In my code I am calling procedures by casting the session into the
object and getting properties from it...
UpdateDataBase(
((Employee)Session["EMPLOYEE"]).EmpId,((Employee)Session["EMPLOYEE"]).DeptId
)
It appears that some of these properties are coming out as null even
though they have been set..I can tell because I have place a catch code
which then uses reflection to get the properties of the object.
So I do
if ( ((Employee)Session["EMPLOYEE"]).EmpId == 0 )
ReflectSessionObject();
And I can see that the .EmpId property does have a value...I default it
to zero if it is null....
Does anyone have any recommendations about this kind of coding...?
Thanks,
MAtt