views:

20

answers:

3

On just about every page in the application I do something based on which employee is currently logged in. Is there an easier way to access the employee other than creating a variable in the Page_Load?

A: 

You must look after Session class.

signetro
A: 

Personally I like inheriting from a class which accepts a employee ID value of some sort, although typically it's the windows identity of the signed in user.

This performs a employee load, and retrieves the appropriate properties or security credentials as needed.

This ensures the details are up to date, and they cannot be impersonated by other users easily.

Bravax
A: 

You might use the built in membership and authentication providers in comination with the login server controls to get the basic functionality.

Gabriel