title: How to use @Html.CheckBoxFor() while dealing with a List<ViewModel>
body: <p>This is my View. How to use CheckboxFor():</p>
  
  <pre><code>@using eMCViewModels;
  @model eMCViewModels.RolesViewModel
  @{
      ViewBag.Title = "CreateNew";
  }
  &lt;h2&gt;
      CreateNew&lt;
  /h2&gt;
  
  @using (Html.BeginForm())
  {
      @Html.ValidationSummary(true)
  
      &lt;fieldset&gt;
          &lt;legend&gt;RolesViewModel&lt;/legend&gt;
          &lt;div class="editor-label"&gt;
              @Html.LabelFor(model =&gt; model.Name)
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.EditorFor(model =&gt; model.Name)
              @Html.ValidationMessageFor(model =&gt; model.Name)
          &lt;/div&gt;
          &lt;div&gt;
              @foreach (RoleAccessViewModel mnu in Model.RoleAccess)
              {
                   // How to use checkboxfor here?
              }
          &lt;/div&gt;
          &lt;p&gt;
              &lt;input type="submit" value="Create" /&gt;
          &lt;/p&gt;
      &lt;/fieldset&gt;
  }
  &lt;div&gt;
      @Html.ActionLink("Back to List", "Index")
  &lt;/div&gt;
  @section Scripts {
      @Scripts.Render("~/bundles/jqueryval")
  }
  </code></pre>
  
  <p><code>Model.RoleAccess</code> is a <code>List&lt;RoleAccessViewModel&gt;</code> and I want to create checkbox using <code>@Html.CheckBoxFor()</code>.</p>
  
  <p>This is my <code>RoleAccessViewModel</code> </p>
  
  <pre><code>public class RoleAccessViewModel
  {
      public int RoleID { get; set; }
      public string RoleName { get; set; }
      public int MenuID { get; set; }
      public string MenuDisplayName { get; set; }
      public string MenuDiscription { get; set; }
      public string IsEnabled { get; set; } // changed to bool
  }
  </code></pre>
  
  <p>Suppose I have 5 items in list, then I need 5 checkbox with ID=menuID and Text = menuDisplayName. How can I achieve this?</p>
  
  <p>EDIT</p>
  
  <p>My attempt </p>
  
  <pre><code>@Html.CheckBoxFor(x=&gt;x.RoleAccess.SingleOrDefault(r=&gt;r.MenuID==mnu.MenuID).IsEnabled )
  @Html.LabelFor(x=&gt;x.RoleAccess.SingleOrDefault(r=&gt;r.MenuID==mnu.MenuID ).MenuDisplayName ) 
  </code></pre>
  
  <p>But after changing the type of <code>IsEnabled</code> from <code>string</code> to <code>bool</code>. The checkbox works. But Label prints only <code>MenuDisplayName</code> instead of values . Can any one helps ?</p>