Reputation: 3499
I have some global settings in my application that is going to be handled by the administrator and I store them in the database.
Settings like: board on/off, max items/page on different UserControls, language, hide/show modules.
What technique should I follow to read the values in the database and display the page or the application according to it .. Of course I could do it the easy way and fetch the required settings for each page in the Page_Load event handler but I think that will be a lot of database connection!
Is there is any better way to achieve this?
Upvotes: 0
Views: 347
Reputation: 9323
You probably want to load your settings into the Application state on Application_Start
in your global.asax
.
Upvotes: 1