lundi 23 février 2015

Current month function in MVC Razor


Month:@Html.DropDownList("Month", new SelectList(new List<object>
{
new { value = 1 , text = "Jan"},
new { value = 2 , text = "Feb"},
new { value = 3 , text = "Mar"},
new { value = 4 , text = "Apr"},
new { value = 5 , text = "May"},
new { value = 6 , text = "Jun"},
new { value = 7 , text = "Jul"},
new { value = 8 , text = "Aug"},
new { value = 9 , text = "Sep"},
new { value = 10 , text = "Oct"},
new { value = 11, text = "Nov"},
new { value = 12 , text = "Dec"},
}, "value", "text", 1), new { @onchange = "e_date_changed();", @style = "width:66px" })
</div>
<div class="DDLabel">
@if()


I want the above DDL month value into my if condition below. how can i do this?


Aucun commentaire:

Enregistrer un commentaire