views:

364

answers:

1

I have a couple of customer websites that have been in use for 4+ years. One of the pages on both sites contain drop downs that now contain 3000+ items. I have attempted initial solutions to this problem by adding new pages to both sites where one site is using silverlight and the other is using ajax.

The silverlight page currently performs better than the ajax page once the control has loaded but requires the user to have silverlight or the permissions to install it. The ajax version has issues that it sends the still requires an initial download of all of the data to complete the drop downs when the site is first loaded.

The ajax version still uses view state and sends 400k+ to the server on every request.

What I would like to do is use the ajax version but cache the drop down data on the client and only download the data once a day.

If I save the data using asp.net to isolated storage (I have that part sorted) is it possible to access it using client side code such as jquery?

+1  A: 

Personally, there's no way I would use a dropdown for 3000+ items. Not only is there a problem with data transfer & viewstate but also its a pain for any user to scroll through that many items to find the option they require.

Have you considered something like this:

http://jquery.bassistance.de/autocomplete/demo/

You have a textbox that says something like 'start typing'... the second the user types the first letter of what they are looking for, an ajax query is made grabbing all the entries that begin with that letter.

Given that there are 26 letters in the alphabet, you will return on average 4% of the data i.e 120 entries rather than 3000!! Also as users get to know your system, they can type more and more letters and find what they are looking for much faster. Beats scrolling through a list of 3000 entries, and makes your application easier to use, more responsive and more network friendly!

reach4thelasers
That is exactly the route I had thought to go down although I have some resistance from the customer and hence the originaly question. The system processes around 6000 records a day and has slowly added to the data displayed in the drop downs since I took over the development. The amount of data displayed is dependant on the users rights so some users may only see 100 items. I had previously gzipped every thing to reduce the data transfer size but with the number of users even bandwidth is becoming a problem.
David Casey
Just checked the link and I think that will resolve my issue
David Casey
No problem! glad to be of help I have used that plugin successfully myself for a facebook style friend search (see remote image search on the demo page), thanks for pushing me over 100 points - remember to 'mark up' your answers as well as accepting them :)
reach4thelasers