views:

2609

answers:

6

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

Thank you, Nagu

A: 

With standart dropdownlist, you can not achive this.

You need to write a custom server control that is not based on dropdown list.

Canavar
A: 

Can you give me a sample code to do this?

Nagu
+1  A: 

Hi Nagu,

I haven't tried to use this JQuery Combo-Box, but from the screenshot, it looks like the items in the combo box can include an image in it. Maybe you could research more regarding this.

Regards,

hadi

hadi teo
A: 

You cannot achieve this with a raw drop down list / combo box in C#. The underlying control only supports text and not a combination of text + image.

You'll either need to write a custom control or use something like jQuery to build the drop down with your code populating the results.

JaredPar
+5  A: 
Seb Nilsson
A: 

Thats right, standred tool dosn't accept images, try with a custom tool.

try with this free tool: http://controlsbuilder.com/tools/CustomDropDownList.aspx

Hassan Osman