ASP.NET MVC ListBox - Items with Icons

  • USA1
  • UK2
  • Germany3
  • France4
  • Russia5
  • India6
  • Japan7
  • China8
The items of the ListBox can contain an icon next to the text.
The source of this image is specified using the ImageUrl property.

View - Aspx
 
    <% Html.Obout(new ListBox("ListBox1") 
    {                
        SelectedIndex = 1,
        ShowSelectedImage = true
    }); %>
    
    
View - Razor
 
    @Html.Obout(new ListBox("ListBox1") 
    {                
        SelectedIndex = 1,
        ShowSelectedImage = true
    })