title: Bind Enums to Checkboxs
body: <p>I'm working on asp.net MVC project . I need to bind enum list to checkboxes ,I have list of enums  , which has the all the enums and other list which cotains only the selected enums . I return model which contains these two lists . How to bind it to the view .I implemented follow code but it's not working</p>
  
  <pre><code>public List&lt;KioskOnboaringConfigurationFactors&gt; SelectedKioskOnboaringConfigurationFactorsList { get; set; }
  
      public List&lt;KioskOnboaringConfigurationFactors&gt; AllKioskOnboaringConfigurationFactors { get; set; }
  
  
  
      @foreach (var g in Model.AllKioskOnboaringConfigurationFactorsList)
      {
          &lt;li&gt;
              &lt;input type="checkbox"
  
                     @{if (Model.KioskOnboaringConfigurationFactorsList.Contains(g)) { &lt;text&gt; checked='checked' &lt;/text&gt;  } } /&gt;
              &lt;label &gt;@g.ToString()&lt;/label&gt;
          &lt;/li&gt;
      }
  </code></pre>