Click here to Skip to main content
15,921,941 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
like city photo with name both are join in one dropdownlist(mvc)

how to bind image in dropdownlistfor(one(table) to relation by(IEnumerable(table))

What I have tried:

i tried dropdownlist but not work for bindind both are so plz anyone help me to join both are show city logo with name
Posted
Updated 11-Jun-17 20:43pm

There is a nice sample (just like your requirement) that I found using Google...
Adding Images to Select Lists in MVC3 | Fairway Technologies[^]
 
Share this answer
 
Comments
vermanishad 12-Jun-17 2:38am    
but it not work properly
Kornfeld Eliyahu Peter 12-Jun-17 2:41am    
But it does - I checked it...
You may changed some things that broke it?
You have to be much more specific than 'not work properly', after all what you state is that you have some code (no one saw it) that has some error (what? logical? actual?)... If you would share those bits we may be of more assistance...
vermanishad 12-Jun-17 2:39am    
i used it
vermanishad 12-Jun-17 2:40am    
DropdroplistFor renders a . this html element does not support an image in the list. you will need to use a javascript library to get this effect. several of the libraries use a as the basis (they hide the select but get values form it.) there are dozens of select replacement libraries.
 
Share this answer
 
Comments
vermanishad 12-Jun-17 2:44am    
it not a mvc
Karthik_Mahalingam 12-Jun-17 2:46am    
convert it to json and use it.

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