Reputation: 8876
I need to have a dropdownlist whose options contains text followed by a small image.
Suppose I have a dropdownlist of fruits. I want to show the options as :
Option 1 : small Image of mango then text Mango
Option 2 : small Image of orange then text Orange .....................
Is it possible to implement in asp.net 2.0?
If yes then please help with sample code.
I don't want to use JQuery.
Upvotes: 0
Views: 965
Reputation: 17750
You don't need to use JQuery, use CSS background-image
property for every <option>
.
Upvotes: 0
Reputation: 8234
You can do that server side by just placing <asp:Image ImageUrl="some.gif" />
tags in your ASP.NET code. The browser will show them when the page is loaded.
Upvotes: 3