Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there i have an app with multiple controllers for a staff intranet. All of the controllers use the logged in user to show data for their records from multiple data stores. I have to repeatedly restrict my data in each controller to a derived variable based on the logged in user. In the interests of DRY what is the best way of doing this.would a public class that accepts a username and returns userid , name etc be the way to go? or a controller that is referenced from within all other controllers? Or store them as session variables when logging in? Any help would be greatly appreciated

Regards

Jason
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900