currently selected month in asp.net calendar control

asp.net, c#

Solution

You can use the `VisibleMonthChanged` event to identify that.

protected void Cal1_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
{
    //e.NewDate.Month will have the new visible month
}

To obtain the name of the month, check these web pages.

Best way to turn an integer into a month name in c#?

http://www.norecursion.com/blog/archive/2010/05/21/how-to-get-month-name-from-integer.aspx

Problem

How do I know which month is selected when no date is selected. For eg, on page load, the calendar will show december. The user click ">" button to show January. How do I know that he has selected January? Tkz

Original source

Related problems