ASP.NET: Images in DropDownLists?
I am having a major dilemma; apparently there is no easy way to add images to list items in a DropDownList. This to me seems ludicrous. I would like my user to be able to pick an icon from a dropdown and afterwards be able to grab that value to update my database. I’ve seen it done elsewhere, I just don’t remember where. I’ve seen solutions like EasyListBox, but I’m not about to shell out $100 for this little bit of functionality, and I’ll be damned if I’m gonna stare at their advertisements in their demo version. I’ve also seen people suggest a DHTML (CSS/Javascript) solution from DynamicDrive.com, but I was unable to find any sort of applicable solution.
THERE MUST BE A WAY. Please help!
Status: Unsolved
Solution: None yet.
RSS Feed
There is no easy way to add images to a LitemItem in the DropDownList because HTML doesn’t support it. So bound by the environment ASP.NET DropDownList cannot support it. Basically your only solution is to render a table that has your desired look. Then dynamically set the CSS style “display:none” and “display:box” to show or hide the the view you want to give your users. Then when they click on the table item you store the value in a hidden input field that will be submitted back. No easy way to accomplish this though. Sorry.
I’m not sure if did you find a solution for your problem or not, but there is a new free tool could help you, check the following url
http://controlsbuilder.com/tools/CustomDropDownList.aspx
Hi,
i Have the same problem and i didn’t find any suitable solution. Did you find some help on this?
thanks ,
Iliya