views:

22

answers:

1

I have an ASP.NET application where i have more than 100 pages.In each pages i want to display the labels (page title,button text etc,, ) which is stored in a table (LabelMaster) which has 2 columns (LabelKey,LabeLValue ). Now i want to know what is the best method to do this. Do i need to fetch all these data in the application on start event and store it in a hashtable /arraylist and then store it in the application variable and the retrive in each page as it needs ? How about caching ? What are the ways to do that in this case ? What are the best practices ? Whats the performance impacts ? Please advice . I am not looking for an solution using resourcefiles

+2  A: 
  1. Fetch your Data into a Dictionary
  2. Create a class that wraps your dictionary for easier access put
  3. that class into ASP.NET Cache

The Cache itself is basically a Dictionary. So performance will be good.

Arthur