how to Creat a DropDownList with Month Names
#region Method to Fill the a DropDownList with Month Names and set the Current Month Selected
public void GetMyMonthList(DropDownList MyddlMonthList,bool SetCurruntMonth)
{
DateTime month = Convert.ToDateTime("1/1/2000");
for (int i = 0; i < 12; i++)
{
DateTime NextMont = month.AddMonths(i);
ListItem list = new ListItem();
list.Text = NextMont.ToString("MMMM");
list.Value = NextMont.Month.ToString();
MyddlMonthList.Items.Add(list);
}
if (SetCurruntMonth == true)
{
MyddlMonthList.Items.FindByValue(DateTime.Now.Month.ToString()).Selected = true;
}
}
#endregion
thats it Happy Coding