private void BindYearlyCal() { string[] localizedMonths = Thread.CurrentThread.CurrentCulture.DateTimeFormat.MonthNames; List <CalMonths> year = new List <CalMonths>(); for (int i = 0; i < localizedMonths.Length - 1; i++) { DateTime date = new DateTime(CurrentYear, i + 1, 1, CultureInfo.CurrentCulture.DateTimeFormat.Calendar); CalMonths month = new CalMonths(); month.Date = date; year.Add(month); } rptMonths.DataSource = year; rptMonths.DataBind(); }
private void BindYearlyCal() { string[] localizedMonths = Thread.CurrentThread.CurrentCulture.DateTimeFormat.MonthNames; List<CalMonths> year = new List<CalMonths>(); for (int i = 0; i < localizedMonths.Length-1; i++) { DateTime date = new DateTime(CurrentYear, i + 1, 1, CultureInfo.CurrentCulture.DateTimeFormat.Calendar); CalMonths month = new CalMonths(); month.Date = date; year.Add(month); } rptMonths.DataSource = year; rptMonths.DataBind(); }