For this I need to have jquery.ddslick.min.js in my solution.
The following is my aspx code:
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jQueryImagesInDropDown.Default" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>jQuery: Showing Images in Drop Down List</title>
- <script src="Scripts/jquery-2.1.4.min.js"></script>
- <script src="Scripts/jquery.ddslick.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(function () {
- var ddlData = [
- {
- text: "Facebook",
- value: 1,
- description: "Facebook",
- imageSrc: "Social/facebook.png"
- },
- {
- text: "Twitter",
- value: 2,
- description: "Twitter",
- imageSrc: "Social/twitter.png"
- },
- {
- text: "LinkedIn",
- value: 3,
- description: "LinkedIn",
- imageSrc: "Social/linkedin.png"
- },
- {
- text: "Google+",
- value: 3,
- description: "Google+",
- imageSrc: "Social/GooglePlus2.jpg"
- },
- {
- text: "c-SharpCorner",
- value: 4,
- description: "A Community For Professional",
- imageSrc: "Social/cSharp.png"
- }
- ];
- $('#ddlSocial').ddslick({
- data: ddlData,
- width: 300,
- imagePosition: "left",
- onSelected: function (selectedData) {
- //Write your logic on Selection index change.
- }
- });
- });
- </script>
- </head>
- <body>
- <form id="form1">
- <div>
- <div id="ddlSocial"></div>
- </div>
- </form>
- </body>
- </html>

Figure 1.
Now run application:

Figure 2.

Figure 3.
Select any item.

Figure 4.

Figure 5.


Raju PaladiyaPosted Feb 27, 2020, 10:52 PM EST
Ddslick is good but I noticed there are many issue in ddslick.
veda kumarPosted Dec 9, 2019, 5:26 PM EST
How to provide search option
Sandeep PatelPosted Jun 11, 2018, 11:57 PM EDT
How to i get selected value into my Label.Text
MansoorPosted Jan 18, 2017, 9:44 PM EST
Hi, nice article. i have noticed that the first item its shows two times
ramakrishna barkamPosted Jan 10, 2017, 3:07 AM EST
Hi how to get selected value?
Shaminder OssanPosted Nov 4, 2015, 3:39 AM EST
This is great....I just know the extreme basic to work on jquery...but with your details it all worked. Is there a way where I Lazy load the images
Rahul Kumar SaxenaTOP 100Posted Sep 11, 2015, 7:00 AM EDT
Thanks Rahul Bisaria
Rahul Kumar SaxenaTOP 100Posted Sep 11, 2015, 7:00 AM EDT
Thanks Santhakumar Munuswamy
Rahul BisariaPosted Aug 6, 2015, 2:49 AM EDT
nice article for learning... :)
Santhakumar MunuswamyPosted Jul 23, 2015, 11:01 AM EDT
Thanks for nice article:)
Rahul Kumar SaxenaTOP 100Posted Jul 21, 2015, 11:40 PM EDT
Thanks Sharad....
SharadPosted Jul 21, 2015, 8:42 PM EDT
good one...
Rahul Kumar SaxenaTOP 100Posted Jul 21, 2015, 9:18 AM EDT
thanks Rakesh Chavda
Rahul Kumar SaxenaTOP 100Posted Jul 21, 2015, 9:18 AM EDT
Thanks Sibeesh Venu
RakeshPosted Jul 21, 2015, 9:12 AM EDT
Nice one sir
Sibeesh VenuTOP 100Posted Jul 21, 2015, 5:34 AM EDT
Nice Share.
Rahul Kumar SaxenaTOP 100Posted Jul 21, 2015, 5:06 AM EDT
Thank u Nilesh Jadav
Nilesh JadavPosted Jul 21, 2015, 5:02 AM EDT
Nice one sir