Saturday, March 24, 2012

WMP-Like Search Function

Hey all,

Basically, I want to create a search function like WMP has; i.e. a search function of which the results are updated every time the user enters a new character in the searchbox.

How should I go about this? I've got it like this now:

I've got an UpdatePanel that contains a DataGrid, set up to do the query to my database. I added an update trigger for the TextChanged event of my asp:TextBox.
This works, but the results are updated only when I hit enter/return in the textbox. Is there a way to make the UpdatePanel update when a key is pressed in my TextBox?

Maybe I have to handle this client side, like handling an added onkeypress event.. But then I still don't know exactly how to call this UpdatePanel.Update(); method.
Or does another/better way to implement such a search function exist?

Any help would be greatly appreciated!

Jorn

Did you ever get this figured out as I would like to know too...

No comments:

Post a Comment