C# – Images in dropdown list


Hi I want to put image along with some data in asp.net drop down list box.

Can somebody give me a sample code to achieve this functionality?

country flag + country name –> in the same list item

Best Solution

You could use jQuery Image Dropdown:


jQuery Image Dropdown
(source: marghoobsuleman.com)

<script language="javascript">    
$(document).ready(function(e) {
    try {
        // target some ids
        MSDropDown.init("#combo1, #combo2");
        //by wild card
        MSDropDown.init("#divid select");
        MSDropDown.init("#formid select");
    } catch(e) {