Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6239607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:25:13+00:00 2026-05-24T11:25:13+00:00

I need to store a Dictionary in my asp .net application. This dictionary is

  • 0

I need to store a Dictionary in my asp .net application. This dictionary is basically a straight mapping of keys (strings) to values (strings). During the life of the Application the dictionary will not change and will contain about 10 elements.

I will be iterating over possibly thousands of rows returned from a stored procedure and obtaining corresponding values from this dictionary.

What would be the best approach to tackle this? Here are the 2 ideas I have on implementing it:

  1. Instantiate and initialize the dictionary during Application_Start and storing it in the ApplicationState object.

Or …

  1. Do what they propose here: How do I store a dictionary object in my web.config file?

I like option 2 since adding a new value in the future is just a matter of adding an entry in Web.Config without any code changes whatsoever but I’m concerned about performance since I will have to obtain a value for every single row returned from the stored procedure.

I wonder if these lookups in web.config are somehow optimized/cached?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:25:14+00:00Added an answer on May 24, 2026 at 11:25 am

    If you’re using ConfigurationManager to access AppSettings values, these are cached after the 1st time they’re accessed. So the first time you access ConfigurationManager.AppSettings["MyValue"], it’s read from disk, after that it’s read from cache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table (dictionary of dictionaries) to store mapping of integers to strings.
I need a Dictionary like object that can store multiple entries with the same
I'm building an ASP.NET MVC 2 application in C# and i am successfully using
i'm having a ListView control like I need to store the data from this
In my application I am having a dictionary which contains Keys A-Z ie 26
I've got a dictionary initialized like so... keyDictionary = [[NSDictionary dictionaryWithObjects:values forKeys:keys]retain]; where keys
I need to store products for an e-commerce solution in a database. Each product
I need to store phone numbers in a table. Please suggest which datatype should
I need to store app specific configuration in rails. But it has to be:
I need to store user entered changes to a particular table, but not show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.