T
ThatsIT.net.au
I have an application where different types of users login. depending what
role they are in they are assigned a diffrent user object, admin dataEntry
and so on.
I can do this using some if statments and then makiung a instance of the
corect object. the propble with this is that i have to do this on every
page. what i would like to do is load the same commonUserObject for each
user, and in the class then assign the right object as a child object. i
could then access the object like this
dim oUser as commonUserObject = new commonUserObject
oUser.childObject.someMethod
This will do, but i was wondering if there was a more elegent way of doing
this, can i some how make the commonUserObject morph into the right object.
role they are in they are assigned a diffrent user object, admin dataEntry
and so on.
I can do this using some if statments and then makiung a instance of the
corect object. the propble with this is that i have to do this on every
page. what i would like to do is load the same commonUserObject for each
user, and in the class then assign the right object as a child object. i
could then access the object like this
dim oUser as commonUserObject = new commonUserObject
oUser.childObject.someMethod
This will do, but i was wondering if there was a more elegent way of doing
this, can i some how make the commonUserObject morph into the right object.