title: MVC Listbox - Show Image in Listbox
body: <p>Can we show images in MVC Listbox?</p>
  
  <p>Model declaration</p>
  
  <pre><code>public List&lt;SelectListItem&gt; Type { get; set; }      //Will hold listbox items
  public string[]SelectedType { get; set; }       //Will hold selected items
  </code></pre>
  
  <p>Data for listbox</p>
  
  <pre><code>    List&lt;SelectListItem&gt; items = new List&lt;SelectListItem&gt;();
      items.Add(new SelectListItem() { Text = "A. Best seller ", Value = "1", Selected = false });
      items.Add(new SelectListItem() { Text = "B. Special offer callout", Value = "2", Selected = true });
      items.Add(new SelectListItem() { Text = "C. Promotion", Value = "3", Selected = false });
      items.Add(new SelectListItem() { Text = "4. Banner Large", Value = "4", Selected = false });
  </code></pre>
  
  <p>model.Type = items;</p>
  
  <p>View Binding</p>
  
  <pre><code>@Html.ListBoxFor(x =&gt; x.SelectedType, Model.Type, new { id = "listType", Multiple = "multiple", Size = 15, style = "width: 100%;" })
  </code></pre>
  
  <p>It successfully display the listbox as below:
  <img src="https://i.stack.imgur.com/5FDuP.png" alt="enter image description here"></p>
  
  <p>Can I bind or display some image with it? Image can be stored on File System or? and name the image as as ID e.g. 1.png, 2.png etc.</p>
  
  <p>Any way to display image here?</p>