Cache dropdownlist

How do I cache dropdownlists? For example, I have a "state" table that doesnt change. I bind it to the ddl once. But next time i load the page, i dont want to go back to the database again...

I think i need to use cache["whatever"] but i dont need for example, to cache for a month something...
Who is Participating?
nakuluConnect With a Mentor Commented:
This might help:

How to: Add Items to the Cache

Daniel Van Der WerkenIndependent ConsultantCommented:
There are multiple mechanisms for saving out state for a page in ASP .NET.

Here is an article on how this is done.

I would say use ViewState["whatever"] = theObject;
CamilliaAuthor Commented:
viewstate? then if i close the page, open it again, it will go to the database again. State info is something that won't change that often...
let me look at the link
CamilliaAuthor Commented:
that link doesnt mention cache.. i need to cache for like a month..i know i've used it before but cant find a sample code
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.