jQuery UI and autocomplete TextBox

This article demonstrates how to add autocomplete feature to asp.net TextBox, exposing autocomplete values via WebService.

The Autocomplete widget is one of the widgets provided in jQuery UI and provides suggestions while you type into the field. jQuery UI is a free widget and interaction library built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.

First let’s create the webservice that will generate some random values.

As you see in comments, please make sure [System.Web.Script.Services.ScriptService] is not commented otherwise you’ll have issues.

Below the code that do our job:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.