title: Displaying HTML and Images in MultiSelectList ASP.NET MVC Razor
body: <p>I need to show a drop down list with ability to select multiple items. I am able to bind this with a Dictionary object and it works fine with plain text values. However, i need to include img tags as well in the values.</p>
  
  <p>This is basically a list of people along with their public profile picture. However, the list shows the html tags instead of showing the actual image.</p>
  
  <p>Here is the razor code in my view:</p>
  
  <pre><code>@Html.ListBox("MyFriends", new MultiSelectList(Model.Connections.Distinct(), "key", "value"), new { @class = "list-item"})
  </code></pre>
  
  <p>The output is shown as:</p>
  
  <pre><code>&lt;img src="http://localhost/api/person/1211/dp" title="avatar" /&gt; John Smith
  &lt;img src="http://localhost/api/person/1212/dp" title="avatar" /&gt; Person Two
  &lt;img src="http://localhost/api/person/1213/dp" title="avatar" /&gt; Person 3
  &lt;img src="http://localhost/api/person/1214/dp" title="avatar" /&gt; Rick Rude
  </code></pre>
  
  <p>But i want to actually show display picture followed by the name. Any solution?</p>