tags:

views:

159

answers:

3

I'm using asp.net and want to filter a search result everytime the user enter letters in a textbox. For exmaple this website do exactly what I want: http://www.prisjakt.nu/ (try searching in the right top corner). I have tried just putting my textbox and the gridview with the search result in an updatepanel, it's working but it's really slow, can I make it faster and how? Is there any articles or something about this?

+1  A: 

If you're open to using jQuery, take a look at jQuery Autocomplete.

Moose
A: 

It depends on how your searching is being implemented.

If your search term starts with A and you hit the database for all "starts with A" then the user adds a "B" and you search the database for all "starts with AB" then you are making expensive database calls over and over again.

If you are instead refining your search term (get all "starts with A" then refine for "starts with AB") it will take up local space, but be quicker, because you are not searching the entire dataset as you get more specific.

A: 

Thanks for your help!

I can't find anything regarding this and ajax, asp.net. I know about the AutoComplete controller and jQuery seems to be the same, but what I want is to filter the gridview when typing not just showing a popup with suggestions, any ideas? I don't know what this is called so it's hard to google..