asp.net - How to use Calendar VisibleMonthChanged event

How to use Calendar VisibleMonthChanged event in asp.net
CalendarVisibleMonthChangedEvent.aspx

<%@ Page Language="C#" AutoEventWireup="true" %>

<!DOCTYPE html>

<script runat="server">
    protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
    {
        Calendar1.TitleStyle.BackColor = System.Drawing.Color.Red;
        Calendar1.TitleStyle.Font.Name = "Comic Sans MS";
        Calendar1.TitleStyle.Font.Italic = true;
        Calendar1.TitleStyle.BorderWidth = 2;
        Calendar1.TitleStyle.BorderStyle = BorderStyle.Dotted;
        Calendar1.TitleStyle.BorderColor = System.Drawing.Color.DeepPink;
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to use Calendar VisibleMonthChanged event in asp.net</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:SlateBlue; font-style:italic;">
            How to use Calendar VisibleMonthChanged Event in asp.net
        </h2>
        <hr width="625" align="left" color="SlateGray" />
        <asp:Calendar
            ID="Calendar1" 
            runat="server"
            NextPrevFormat="FullMonth"
            ForeColor="WhiteSmoke"
            SelectionMode="Day"
            DayNameFormat="Full"
            Font-Names="Book Antiqua"
            Font-Size="Medium"
            OnVisibleMonthChanged="Calendar1_VisibleMonthChanged"
            >
            <DayHeaderStyle
                 BackColor="OliveDrab"
                 />
            <DayStyle
                 BackColor="DarkOrange"
                 BorderColor="Orange"
                 BorderWidth="1"
                 Font-Bold="true"
                 Font-Italic="true"
                 Width="100"
                 Font-Size="X-Large"
                 />
            <NextPrevStyle
                 Font-Italic="true"
                 Font-Names="Arial CE"
                 Font-Size="Large"
                 />
            <OtherMonthDayStyle
                 BackColor="Tomato" 
                 BorderColor="Orange"
                 />
            <SelectedDayStyle
                 BackColor="DarkOrchid"
                 BorderColor="Pink"
                 />
            <TitleStyle
                 BackColor="MidnightBlue"
                 Height="36"
                 Font-Size="X-Large"
                 Font-Names="Courier New Baltic"
                 />
        </asp:Calendar>
    </div>
    </form>
</body>
</html>
More asp.net examples