在asp.net中进行数据集缓存并分配到级联下拉列表? [英] Dataset caching in asp.net and assigning to cascading dropdown list?

查看:73
本文介绍了在asp.net中进行数据集缓存并分配到级联下拉列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有这样的情景。我有4个下拉列表框,它们将根据前一个下拉列表中的选择进行级联。



例如,将我的第一个下拉列表保留为国家/地区,将第二个下拉列表保存为州,将第三个下拉列表保留为区域。例如。如果我选择印度,那么必须加载州。然后如果选择古吉拉特邦,则必须加载区。



我使用Ajax Cascadedropdown来执行此操作。



这是我在缓存概念中所做的。首次加载页面时,所有四个下拉列表的总数据必须作为数据集加载并存储在缓存中。因此,当我在第一个下拉列表中选择Country时,必须从缓存本身加载第二个下拉列表的数据。这样页面就不会被回发。即使我刷新页面也不会去数据库再次获取数据。这将使页面性能迅速提升。



我是缓存概念的新手。所以,如果可以用详细的代码帮助解决这个问题,那将是很棒的



提前谢谢,

Naveen。

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.

推荐答案

检查这是否对您有所帮助:



Check if this helps you:

Cache["data"]=ds; //ds is your dataset name.

这篇关于在asp.net中进行数据集缓存并分配到级联下拉列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆