Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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
Updated 27-Jun-14 13:04pm
[no name] 27-Jun-14 16:05pm    
Put yourself in your user's shoes for just a second..... would you want to scroll through 15000 items looking for the one thing that you want? Bad design.
Yasser El Shazly 27-Jun-14 16:19pm    
i am trying to give the user the power of filtering the comboBox to fetch required item faster , but i didnt knew how can i do that?
[no name] 27-Jun-14 16:47pm    
Why can't you let the user select from a category of items? Then show the items that fit into that category?
Yasser El Shazly 27-Jun-14 16:20pm    
you are right but what is the good design in your point of view
Sergey Alexandrovich Kryukov 27-Jun-14 16:43pm    
We don't know your ultimate goals. Besides, if you don't feel insanity of your idea, you first need to fix your thinking; no design ideas can help you.

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
Share this answer
15k items in a dropdown?
this is very bad...

use an autocomplete [^]
that retrieves items when at least a couple of char are inserted...
Share this answer
Yasser El Shazly 30-Jun-14 19:50pm    
How can i use this Jquery AutoComplete With .Net MVC 4
nrgjack 1-Jul-14 4:37am    
well i used AjaxControlToolkit in the past that have an autocomplete that works with ASMX webservice in order to load items, otherwise you can check jquery ui autocomplete :
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.
Share this answer
Yasser El Shazly 27-Jun-14 17:01pm    
yes Exactly i want to Searching/Filtering First but i didn't knew how can i do that with DropDownlistFor , can you help me ?
None of the users except the most insane ones will get enough patience to choose an item from 15000 in the same list box. You need to radically review your UI design.

Share this answer
Yasser El Shazly 27-Jun-14 16:45pm    
Ok, but My question was what is the best way to do that ?
and i wanna make Server Filtering Over DropDownListFor and i didnt knew how can i do server filtering ... any help ?

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