title: How do I display `int` items in a Razor view
body: <p>I have this bit of code in my model:</p>
  
  <pre><code>public class ContactDaySelectorAttribute : SelectorAttribute
  {
      public override IEnumerable&lt;SelectListItem&gt; GetItems()
      {
          var contactDay = new List&lt;ContactDay&gt; 
          { 
              new ContactDay {Id = 1, Name = "Monday"},
              new ContactDay {Id = 2, Name = "Tuesday"},
              new ContactDay {Id = 3, Name = "Wednesday"},
              new ContactDay {Id = 4, Name = "Thursday"},
              new ContactDay {Id = 5, Name = "Friday"},
              new ContactDay {Id = 6, Name = "Saturday"},
          };
          return contactDay.ToSelectList(m =&gt; m.Id, m =&gt; m.Name);
      }
  }
  //
  public class ContactDay
  {
      public int Id { get; set; }
      public string Name { get; set; }
  }
  //
  [ContactDaySelector]
  public virtual int? ContactDayCheckBox { get; set; }
  //
  [ContactDaySelector]
  [ReadOnly(true)]
  public string ContactDayCheckBoxPost
  {
      get { return ContactDayCheckBox.ToString(); }
  }
  </code></pre>
  
  <p>I use <code>ContactDayCheckBox</code> to store the <code>int?</code> value in the database. I use <code>ContactDayCheckBoxPost</code> to display the selected items (checkbox) in a confirmation view.</p>
  
  <p>If I do <code>@Html.EditorFor(m =&gt; m.ContactDayCheckBoxPost)</code> in my view, and the user previously selected MORE than one day (for example), it only displays the "Name" for one day (i.e., if Monday, Tuesday previously selected, it only displays "Monday" in the view).</p>
  
  <p>How can I go about getting the view to display all of the choices previously selected? I tried <code>@foreach</code> but it won't work with <code>int</code>, and I tried variations of looping that involved <code>.Split(',')</code> to insert a comma between the choices, but all I get is the actual "Id" value (e.g., "1" for "Monday", instead of "Monday").</p>
  
  <p>Thanks in advance.</p>