Display Months in Combo box
The following code will display Month Name from Jan ...Dec in the combo box.
DateTime dt = new DateTime();
for (int i = 0; i < 12; i++)
{
cbxMonth.Items.Add(dt.AddMonths(i).ToString("MMMM"));
}
DateTime dt = new DateTime();
for (int i = 0; i < 12; i++)
{
cbxMonth.Items.Add(dt.AddMonths(i).ToString("MMMM"));
}
Labels: Display Month from January to December, display Month in Combo Box, Jan..Dec.., Populate Month in List / Combo Box
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home