Solved

Cache dropdownlist

Posted on 2011-09-09
5
256 Views
Last Modified: 2012-05-12
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...
0
Comment
Question by:Camillia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 20

Expert Comment

by:Daniel Van Der Werken
ID: 36511352
There are multiple mechanisms for saving out state for a page in ASP .NET.

Here is an article on how this is done.
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

I would say use ViewState["whatever"] = theObject;
0
 
LVL 7

Author Comment

by:Camillia
ID: 36511373
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
0
 
LVL 7

Author Comment

by:Camillia
ID: 36511387
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
0
 
LVL 1

Accepted Solution

by:
nakulu earned 250 total points
ID: 36512019
This might help:

How to: Add Items to the Cache
http://msdn.microsoft.com/en-us/library/18c1wd61.aspx#Y114

0
 
LVL 16

Assisted Solution

by:disrupt
disrupt earned 250 total points
ID: 36514943
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question