J'ai créé un dropdownbox très simple:Obtenir le nom du mois affiché en très simple dropdownbox
<asp:DropDownList ID="MonthDropDown" runat="server" AutoPostBack="True">
</asp:DropDownList>
code Derrière:
MonthDropDown.DataSource = Enumerable.Range(1, 12);
MonthDropDown.SelectedIndex = DateTime.Now.Month;
MonthDropDown.DataBind();
Est-il possible d'obtenir le MonthDropDown
(mon dropdownbox) à afficher le nom du mois, au lieu de la valeur numérique du mois. Je pense qu'il pourrait être quelque chose comme
DateTimeFormatInfo.CurrentInfo.GetMonthName(MonthDropDown.SelectedIndex)?