Search code examples
c#asp.netwebformsdatabase-connectioninformation-retrieval

Where to store the global settings to allow the application to access them frequently without dropping a big over head on the database


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?


Solution

  • You probably want to load your settings into the Application state on Application_Start in your global.asax.