在下拉列表中填充15000项 [英] Populate 15000 Item in dropdownlist

查看:115
本文介绍了在下拉列表中填充15000项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

i我正在开发MVC网站进行在线订购,我将加载大约15000件物品来管理用户选择他/她的订单商品



加载这些巨大的物品后,我的网站看起来很慢,



我怎么能让服务器端过滤......我的意思是什么用户输入3个字符然后我去我的数据库选择包含这3个字符的项目并在下拉列表中显示它我该怎么做?



提前感谢

hello guys ,
i am developing MVC Website for online ordering , i have about 15000 items will be loaded to manage the user to choose the his/her order item

after loading these huge items my web site seems very slow ,

how can i make a server side filtering ... what i mean user type 3 characters then i go to my DB Select items that contains these 3 characters and show them in the dropdownlist how can i do that ?

thanks in advance

推荐答案

您可以提供各种复选框/单选按钮过滤控件来限制数据回。将其与分页效果相结合,仅返回(例如)列表中的前100个项目...按需加载数据
You could offer various checkbox/radio button filtering controls to limit the data returned. Combine that with a "paging" effect to only return (e.g.) the first 100 items in the list... load data on demand


下拉列表中的15k项目?

这非常糟糕...



使用自动填充 [ ^ ]

,在插入至少几个char时检索项目...
15k items in a dropdown?
this is very bad...

use an autocomplete [^]
that retrieves items when at least a couple of char are inserted...


浏览器无法在一次加载中处理那么多数据。您将首先允许搜索/过滤或创建菜单结构以便他们可以浏览。然后,无论您决定使用何种类型的转发器控件,您都希望实现分页。
Browsers cannot handle that much data in one load. You'll want to allow searching/filtering first or create a menu structure so that they can browse. And then whatever type of repeater control you decide to use you'll want to implement paging.


这篇关于在下拉列表中填充15000项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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