The dropdownlists in asp.net mvc seems to make a lot of confusion for programmers who start from asp.net. This article describes all the aspects you need to know in asp.net mvc in order to use dropdownlists.
Dropdownlist,combobox, no matter what you like to call them, they will be born into HTML select tags without exception. Between the <select> tab and the </select> closed tag, each list element must be wrapped around the <option> tag. Of course you can use the <optgroup> tab to logically into different groups. If the Value property is set for <option>, the Value property is the values of the Select element when the form is committed. And if you forget to assign a value to the Value property, then in the <option></option> label The contents of the inner parcel are the submitted values.
For the sake of simplicity, let me use a static list as an example, and you can add these as HTML directly to your view:
<select name="year">
<option>2010</option>
<option>2011</option>
<option>2012</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
</select>
Or, add a little bit of dynamic to the list, and if the year you want to list will automatically push back for 1 years as the New Year arrives:
<select name="year">
<option><%= DateTime.Now.Year %></option>
<option><%= DateTime.Now.AddYears(1).Year %></option>
<option><%= DateTime.Now.AddYears(2).Year %></option>
<option><%= DateTime.Now.AddYears(3).Year %></option>
<option><%= DateTime.Now.AddYears(4).Year %></option>
<option><%= DateTime.Now.AddYears(5).Year %></option>
</select>
It can be even simpler:
<select name="year">
<% for (var i = 0; i < 6; i++){%>
<option><%= DateTime.Now.AddYears(i).Year %></option>
<%}%>
</select>