Images in dropdown list

2020-01-25 01:13发布

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

8条回答
Fickle 薄情
3楼-- · 2020-01-25 01:42

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.

查看更多
登录 后发表回答