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

1 Answer 1

3

Dictionary<TKey, TValue> works

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.