How do the words in the search append as in Google
I write "video " and I is added to the drop-down list:
video co开发者_高级运维nverter
video saver
video player
Ho do this? I just know that every time the asp.net page reloads, but I need without overloading.
You need to use a Autocomplete script. Microsoft's AJAX Control Toolkit provides that.
And there's also a jQuery UI Autocomplete.
Here are some tutorials on the subject:
Microsoft's:
- http://www.ajaxtutorials.com/ajax-tutorials/using-autocomplete-in-the-ajax-toolkit/
- http://www.ajaxtutorials.com/ajax-control-toolkit-tutorials/ajax-control-toolkit-tutorial-autocomplete-extender-using-asp-net-c/
jQuery's
- jQuery Autocomplete and ASP.NET
- JQuery AutoComplete plugin in ASP.Net page with C#
I will have the decency of not copying the code from those to here :)
You are talking about something called AutoComplete. To implement this functionality you will need to use AJAX. In ASP.NET there are two popular ways to accomplish this:
The AJAX toolkit from Microsoft
jQuery
I personally prefer jQuery because it feels more lightweight/intuitive than what Microsoft offers, but I would recommend looking at both and seeing what you are more comfortable with. The AJAX toolkit is more integrated with Visual Studio so many people prefer using this...
精彩评论