Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have a scenario like this. I have 4 dropdown list boxes which will cascade depending on the selection made in the previous dropdown list.

For instance keep my first dropdown list as country, second dropdown list as state and third dropdown as districts. For eg. If i select India, then the states must be loaded. Then if select Gujarat, then the districts must be loaded.

I am using a "Ajax Cascadedropdown" to do this.

This i have do in "Caching" concept. When the page is loaded for first time the total data for all four dropdown lists must be loaded as a "dataset" and stored in a "cache". So that when I select Country in first dropdown the data for the second dropdown must be loaded from the cache itself. So that the page will not be posted back. Even if i refresh the page will not go to database to fetch the data again. This will make the page performance is increase rapidly.

I am new to caching concept. So if could help to solve this issue with detailed code it would be great of you

Thanks in advance,
Naveen.
Posted

1 solution

Check if this helps you:

C#
Cache["data"]=ds; //ds is your dataset name.
 
Share this answer
 
Comments
Nrajmec 12-Jul-13 3:27am    
Thanks for taking interest in answering my ques.

I got this but i dont know how to retrieve the value from cache, when a user selects a value in the first dropdown list and to load the corresponding value in second dropdown.
Priyanka7777 12-Jul-13 3:35am    
Check out this link which shows how to Retrieve Values of Cached Items.

http://msdn.microsoft.com/en-IN/library/xhy3h9f9(v=vs.100).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900