AutoComplete DropDown Using jQuery With C#

In today's world we often see autocomplete dropdown lists. Whenever you type the first one or two characters of the word they show the words that begin with those characters. jQuery is used basically for the providing the look and feel in your application. It provides a good looking and easy way to use an application. In this article I am showing how to use an autocompleted dropdown list in ASP.NET application with C#.

First of all you need to add the two jQuery files and one CSS file. This is given in my zip code folder.

Listing 1: Go to Visual Studio 2010 then select "New" -> "Web site" and choose "Empty Website".

Empty Website

Listing 2: Add a JavaScript and CSS file to your application that is provide in the Zip file.

js and css file
Listing 3: Add a new web page to your application. Go to Solution Explorer and right-click then select "Add new item"then choose "New web form" and name it "FancyDropdownlist.aspx".

Add new web page

Listing 4: Source Code for FnacyDropdownlist.aspx

Code for Dropdownlist
Code behind

Listing 5: Code behind FancyDropDownlist.aspx.cs

Cs Code

Listing 6: Run the project in the browser.

Run the project

Output

I hope this article will help you to add auto dropdown list functionality to you application.

Up Next
    Ebook Download
    View all
    Learn
    View all