Click here to Skip to main content
15,902,840 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
displaying images using dropdownlist in asp.net
Posted
Comments
Sandeep Mewara 17-May-11 2:50am    
No effort.

What do you mean ?

Are you looking for a dropdown that will show images in it ?

If this is so, you cant do this using Normal Select, you need to make that yourself using Javascript just like here.[^]

:cool:
 
Share this answer
 
Take an image let say "Image1",Take a drop down let say "DropDown1",Bind dropdown and set "DataTextField" as Name of the image and "DataValueField" as Path of the image.Set AutoPostBack property of drop down to true and assign following code
on selectedindexchange event of dropdown

Image1.ImageUrl=DropDown1.SelectedValue.ToString();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900