2

Question: What is a good datatype to keep in session for a large collection of keys and values to frequently reference and update?

Application: Updating an old .NET web app with a million pages and grids to have all the grids maintain their sort. They currently access helper code to format themselves graphically on load and on sort. I figured I could add to that code to check for a key based on the page and grid id in a collection in session to see if it has a previous expression on load. and the on sort update/add its appropriate item in the collection.

Thoughts?

Dictionary vs NameValueCollection

Community
  • 1
  • 1
jumpdart
  • 1,702
  • 16
  • 35

1 Answers1

3

Dictionary<TKey, TValue> works

Conrad Frix
  • 51,984
  • 12
  • 96
  • 155
  • cool thanks! I found a helpful question on SO comparing what i thought to be my best options which confirmed your answer. I added it to the question. – jumpdart Jan 14 '11 at 16:50