title: How Model bind to a Enum using ASp.NET MVC
body: <p>I have a enum and I am trying to model bind it using ASP.NET MVC.</p>
  
  <pre><code>public class MyViewModel
  {
    public enum ESampleTime
      {
          Value1= 0,
          Value2,
          Value3,
          Value4,
          Value5,
          Value6
      }
  }
  </code></pre>
  
  <p>And I am trying to model bind it using ,</p>
  
  <pre><code>&lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.SampleTime, htmlAttributes: new { @class="control-label col-md-2"})
              &lt;div class="col-md-2"&gt;
                  @Html.DropDownListFor(model =&gt; model.SampleTime,new List&lt;SelectListItem&gt;())
              &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>This results in empty list as I am passing a new <code>SelectedItem</code> <code>List.</code></p>
  
  <p>But how do I display Value1, value2... in listBoix?</p>