I have an application that I am working on that has a 3 tier architecture. I have two derived classes from my basic user class (administrator and internal user). I am using polymorphism with these classes to give the users similar control with some minor differences of course. Basically based on the type of user, I load a different nav menu.
On each page that pertains to an administrator, I instantiate the administrator class and hold all of the objects that the admin will use inside of this class. I carry this class around in a session object to hold the data as they go along in the site. I do the same thing for the regular user.
The problem I am running into is when both users need to use the same page. I know that I can do an object type check, but this doesn't solve my problem because I declare the user type object in the class itself as oppsed to within an page_load method. Is there a way around this or should I just redo how I have the objects built? Any help would be greatly e appreciated.