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:
- Fetch your Data into a Dictionary
- Create a class that wraps your dictionary for easier access put
- that class into ASP.NET Cache
The Cache itself is basically a Dictionary. So performance will be good.
Arthur
2009-10-21 18:06:29