Connecting Tech Pros Worldwide Forums | Help | Site Map

How to add Image in DropDownList (Asp.net with C#)

Newbie
 
Join Date: Jun 2007
Posts: 7
#1: Jun 18 '07
Hi....

Hello Friend's

I have some difficulty is that DropDownList

How to Add Image in DropDownList

plz reply as possible as with e.g.

thx,

Regarding,

Tushar Poshiya

Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,131
#2: Jun 18 '07

re: How to add Image in DropDownList (Asp.net with C#)


Quote:

Originally Posted by tusharposhiya

Hi....

Hello Friend's

I have some difficulty is that DropDownList

How to Add Image in DropDownList

plz reply as possible as with e.g.

thx,

Regarding,

Tushar Poshiya


I don't think that dropDownLists support images.
Just like HTML <select> lists don't support images.

Sorry,

-Frinny
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#3: Jun 18 '07

re: How to add Image in DropDownList (Asp.net with C#)


If this is a webpage and you REALLY want a drop downlist with images, you could simulate it with javascript and CSS

design a div with a z-index above your regular page. Set the display type to invisible. Give it a static size and tell it to overflow:auto in the css.
Then you can add a table to the DIV with images and items and hyperlinks and whatever.
You then make a generic hyperlink on your page that causes that hidden div to display when it gets clicked on. Mimic-ing the behavior of a drop down list.
Reply