<div class="DDLabel">
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">
Day:@Html.DropDownList("Day", new SelectList(new List<object>
{
new { value =1, text = "1"},
new { value =2, text = "2"},
new { value =3 ,text ="3"},
new { value =4, text = "4"},
new { value =5, text = "5"},
new { value =6, text = "6"},
new { value =7, text = "7"},
new { value =8, text = "8"},
new { value =9, text = "9"},
new { value =10, text = "10"},
new { value =11, text = "11"},
new { value =12, text = "12"},
new { value =13, text = "13"},
new { value =14, text = "14"},
new { value =15, text = "15"},
new { value =16, text = "16"},
new { value =17, text = "17"},
new { value =18, text = "18"},
new { value =19, text = "19"},
new { value =20, text = "20"},
new { value =21, text = "21"},
new { value =22, text = "22"},
new { value =23, text = "23"},
new { value =24, text = "24"},
new { value =25, text = "25"},
new { value =26, text = "26"},
new { value =27, text = "27"},
new { value =28, text = "28"},
new { value =29, text = "29"},
new { value =30, text = "30"},
new { value =31, text = "31"},
}, "value", "text", 1), new { @onchange = "e_date_changed();", @style = "width:66px" })
</div>
I want a if condition. By which user if user select April month then in next DropDownList must show only 30 day and if October then it should b 31 days. How can i do this and where should be this code placed?
Aucun commentaire:
Enregistrer un commentaire