title: ASP.Net MVC Select List for Value Type
body: <p>I'm trying to do the simplest thing with an dropdown and it's just not working. I have a an integer property called <code>SearchCriteria.Distance</code>. It's a simple integer property. I'm trying to bind that property to a drowpdown list of integers but it will not bind. The value is always <code>0</code>. Here's the code: </p>
  
  <pre><code>@Html.LabelFor(x =&gt; x.SearchCriteria.Distance, "Radius (miles)", new { @class="control-label" })
                              &lt;div class="controls"&gt;
                                  @Html.DropDownListFor(x =&gt; x.SearchCriteria.Distance, new SelectList(new int[] { 5, 15, 25, 50 }), new { @class="input-small", style="height:36px;"})
                              &lt;/div&gt;
  </code></pre>
  
  <p>Because it's a simple integer list, there's not <code>Text</code> <code>Value</code> to  associate it with. What am I doing wrong here?</p>
  
  <p><strong>Edit</strong>: Turns out this problem was the result of a stupid error on my part. I had a hidden field with the <code>SearchCriteria.Distance</code> id on my form that I forgot about that prevented the drop down value from being set. I marked the solution below as the answer because it is correct. </p>