MyMonthsComboBox.SelectedText = DateTime.Now.ToString("MMMM")
"MMMM"
"MMM"
int month = System.DateTime.Now.Month;
ComboBox1.SelectedIndex = DateTime.Now.Month - 1
DateTime.Today.ToString("MMMM")
ddl.SelectedIndex = ddl.Items.IndexOf(ddl.Items.FindByValue(GetMonthName(DateTime.Now.Month))); ddl.SelectedItem.Selected = true; private string GetMonthName(int monthNumber) { DateTime dtDate = new DateTime(2000, monthNumber, 1); Return dtDate.ToString("MMMM"); }
string sMonth = DateTime.Now.Month.ToString("00");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)