Click here to Skip to main content
12,815,616 members (40,898 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 13 Jul 2013

Custom ASP.NET DropdownList Control Using Chosen jQuery Plugin

, 26 Oct 2015 CPOL
Rate this:
Please Sign up or sign in to vote.
Custom ASP.NET DropdownList control using chosen jQuery plugin


The ASP.NET DropDownList is an easy way to offer a set of selections for the user. However, if you want to allow the user to enter information not available in the dropdown list, you will have to write your own JavaScript code or jQuery. This source code combines that work into an ASP.NET DLL control you can easily place on any ASP.NET web page.

The downloadable source project above uses the following technologies:



You do not need to have knowledge of jQuery, JavaScript, or CSS to use the DropDownListChosen. The only requirement is to drag and drop the DropDownListChosen control. The source code download contains the class library project for the DropDownListChosen and a test website using the DropDownListChosen control.

Using the Nuget-Package

You can now reference this project as a nuget package.

  • Install-Package DropDownListChosen

This will add necesary configuration for you, just add the control tag to your webform like this.

<asp:DropDownListChosen ID="DropDownListChosen1" runat="server" 
            NoResultsText="No results match." width="350px"            
            DataPlaceHolder="Type Here..." AllowSingleDeselect="true">                
  1. Bind items to your dropdown list either manually by adding ListItems to the DropDownListChosen or by binding to a DataSource.
    Datasource example can be found in the downloadable source code above.

You're done! You can now work with your DropDownListChosen to find what options work best for you. I would love to hear some great feedback if you use this control on your site.

Also added a repository on github.


  • 13th July, 2013: Tip published
  • 7th August, 2013: Added DataPlaceHolder property and removed style sheet that causes design problems
  • 7th September, 2013: Added new properties AllowSingleDeselect and DisableSearchThreshold
  • 25 Octiber, 2015: Added as a Nuget Package


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Angel Blandón
Software Developer Communications
Nicaragua Nicaragua
I am a ASP.Net Software Developer from Nicaragua.

You may also be interested in...


Comments and Discussions

AnswerRe: hello friend. Pin
Angel Blandón20-Oct-15 11:16
memberAngel Blandón20-Oct-15 11:16 
GeneralRe: hello friend. Pin
Mojtaba Setoodeh26-Oct-15 0:10
memberMojtaba Setoodeh26-Oct-15 0:10 
QuestionHow to load the dropdown without selecting any item Pin
Member 101991946-Aug-15 0:56
memberMember 101991946-Aug-15 0:56 
QuestionNot enabling search option while call this control page in iframe Pin
Member 1019919423-Jul-15 21:09
memberMember 1019919423-Jul-15 21:09 
QuestionSelectedIndexChanged function not firing up Pin
mehboob samnani23-Jul-15 3:28
membermehboob samnani23-Jul-15 3:28 
AnswerRe: SelectedIndexChanged function not firing up Pin
Angel Blandón26-Jul-15 14:15
memberAngel Blandón26-Jul-15 14:15 
QuestionControl Problem Pin
UAB Mike Johnston15-Apr-15 3:39
memberUAB Mike Johnston15-Apr-15 3:39 
QuestionHow to Add the item if it is not in the list Pin
STPL TEST15-Apr-15 3:28
memberSTPL TEST15-Apr-15 3:28 
QuestionRTL right to left direction sites not working properly Pin
nawinsoft26-Mar-15 7:57
membernawinsoft26-Mar-15 7:57 
Questionunable to search if i add items dynamically Pin
Malar Karthik6-Mar-15 18:00
memberMalar Karthik6-Mar-15 18:00 
AnswerRe: unable to search if i add items dynamically Pin
Angel Blandón7-Mar-15 16:44
memberAngel Blandón7-Mar-15 16:44 
Questionhow to set the value of DropDownListChosen1 from javascript or jquery Pin
Member 1128534118-Feb-15 22:41
memberMember 1128534118-Feb-15 22:41 
AnswerRe: how to set the value of DropDownListChosen1 from javascript or jquery Pin
Angel Blandón19-Feb-15 3:15
memberAngel Blandón19-Feb-15 3:15 
GeneralRe: how to set the value of DropDownListChosen1 from javascript or jquery Pin
Member 1128534119-Feb-15 19:45
memberMember 1128534119-Feb-15 19:45 
Questionon postback styles are lost Pin
goud1238-Dec-14 5:41
membergoud1238-Dec-14 5:41 
QuestionHow to search as sql like '%a%' ? Pin
Nikhil Khandelwal (MCTS, Web 4.0)3-Nov-14 17:29
memberNikhil Khandelwal (MCTS, Web 4.0)3-Nov-14 17:29 
Questionhi Pin
chamila18-Sep-14 20:37
memberchamila18-Sep-14 20:37 
QuestionError Javascript Pin
dianaemanuel15-Jul-14 2:27
memberdianaemanuel15-Jul-14 2:27 
Questionthanks but after using this my other java script is not working.. pls help its urgent Pin
ranoooooooooo8-Jul-14 21:52
memberranoooooooooo8-Jul-14 21:52 
AnswerRe: thanks but after using this my other java script is not working.. pls help its urgent Pin
Angel Blandón9-Jul-14 5:08
memberAngel Blandón9-Jul-14 5:08 
QuestionThank You :) Pin
Member 109337018-Jul-14 20:51
memberMember 109337018-Jul-14 20:51 
QuestionHow to bind this drop down from sql database Pin
Harishankar Maurya12-May-14 1:44
memberHarishankar Maurya12-May-14 1:44 
AnswerRe: How to bind this drop down from sql database Pin
Angel Blandón12-May-14 3:30
memberAngel Blandón12-May-14 3:30 
AnswerMessage Automatically Removed Pin
19-Feb-14 4:32
memberMember 1014497619-Feb-14 4:32 
QuestionSearch option is not working Pin
Nuthan Gowda23-Dec-13 20:02
memberNuthan Gowda23-Dec-13 20:02 
AnswerRe: Search option is not working Pin
Moneer Tarabishi21-Oct-14 22:16
memberMoneer Tarabishi21-Oct-14 22:16 
GeneralRe: Search option is not working Pin
Angel Blandón22-Oct-14 5:21
memberAngel Blandón22-Oct-14 5:21 
GeneralRe: Search option is not working Pin
Moneer Tarabishi24-Oct-14 3:28
memberMoneer Tarabishi24-Oct-14 3:28 
QuestionMultiple controls on same page - making them unique? Pin
Eldorado22-Dec-13 9:39
memberEldorado22-Dec-13 9:39 
AnswerRe: Multiple controls on same page - making them unique? Pin
Angel Blandón2-Dec-13 10:40
memberAngel Blandón2-Dec-13 10:40 
QuestionCan we turn it to Multi Select ?? Pin
benaref29-Nov-13 0:57
memberbenaref29-Nov-13 0:57 
AnswerRe: Can we turn it to Multi Select ?? Pin
Member 1047980020-Dec-13 14:16
memberMember 1047980020-Dec-13 14:16 
GeneralRe: Can we turn it to Multi Select ?? Pin
#teve27-Feb-14 10:41
member#teve27-Feb-14 10:41 
QuestionTHX Pin
benaref18-Nov-13 22:34
memberbenaref18-Nov-13 22:34 
QuestionIssue in IE9 Pin
Eldorado221-Oct-13 8:33
memberEldorado221-Oct-13 8:33 
QuestionHow to override css? Pin
Eldorado28-Oct-13 10:39
memberEldorado28-Oct-13 10:39 
AnswerRe: How to override css? Pin
Angel Blandón8-Oct-13 11:19
memberAngel Blandón8-Oct-13 11:19 
GeneralRe: How to override css? Pin
Eldorado29-Oct-13 4:15
memberEldorado29-Oct-13 4:15 
QuestionNice but same problem as ajax combobox Pin
ktkiebel17-Sep-13 17:28
memberktkiebel17-Sep-13 17:28 
QuestionSearch option not displaying Pin
anuexuberant11-Sep-13 3:31
memberanuexuberant11-Sep-13 3:31 
AnswerRe: Search option not displaying Pin
Angel Blandón11-Sep-13 6:42
memberAngel Blandón11-Sep-13 6:42 
QuestionSelected item not working Pin
Member 102092289-Sep-13 6:56
memberMember 102092289-Sep-13 6:56 
AnswerRe: Selected item not working Pin
Angel Blandón9-Sep-13 8:27
memberAngel Blandón9-Sep-13 8:27 
QuestionZIP file broken? Pin
Member 1020758214-Aug-13 14:13
memberMember 1020758214-Aug-13 14:13 
AnswerRe: ZIP file broken? Pin
Angel Blandón14-Aug-13 18:14
memberAngel Blandón14-Aug-13 18:14 
GeneralRe: ZIP file broken? Pin
Member 1020758215-Aug-13 6:18
memberMember 1020758215-Aug-13 6:18 
GeneralRe: ZIP file broken? Pin
Member 1020758215-Aug-13 8:05
memberMember 1020758215-Aug-13 8:05 
Questionhow to use in MVC4 Pin
Mohit Jagtap10-Aug-13 3:22
memberMohit Jagtap10-Aug-13 3:22 
AnswerRe: how to use in MVC4 Pin
Angel Blandón10-Aug-13 7:13
memberAngel Blandón10-Aug-13 7:13 
Questionchanging the entire page design while adding DropDownListChosen dll Pin
shyamrashun6-Aug-13 19:52
membershyamrashun6-Aug-13 19:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170308.1 | Last Updated 26 Oct 2015
Article Copyright 2013 by Angel Blandón
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid