asp.net - Deselect a specific date from a Calendar selected dates

How to remove deselect specific date from Calendar selected dates
DeselectSpecificDateFromCalendar.aspx

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

<!DOCTYPE html>

<script runat="server">
    protected void Calendar1_SelectionChanged(object sender, System.EventArgs e)
    {
        SelectedDatesCollection dates = Calendar1.SelectedDates;
        
        foreach (DateTime date in dates)
        {
            if (date == DateTime.Today)
            {
                Label1.Text = "Today deselected programmatically";
                dates.Remove(date);
                break;
            }
        }
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to remove deselect specific date from Calendar selected dates</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:DarkMagenta; font-style:italic;">
            How to remove deselect specific date from Calendar selected dates
        </h2>
        <hr width="550" align="left" color="Green" />
        <asp:Label
            ID="Label1" 
            runat="server"
            Font-Size="X-Large"
            ForeColor="OrangeRed"
            Font-Italic="true"
            >
        </asp:Label>
        <br /><br />
        <asp:Calendar
            ID="Calendar1" 
            runat="server"
            NextPrevFormat="FullMonth"
            SelectionMode="DayWeekMonth"
            SelectMonthText="Month"
            SelectWeekText="Week"
            ForeColor="WhiteSmoke"
            DayNameFormat="Full"
            Font-Names="Book Antiqua"
            Font-Size="Medium"
            OnSelectionChanged="Calendar1_SelectionChanged"
            >
            <DayHeaderStyle
                 BackColor="PaleVioletRed"
                 />
            <DayStyle
                 BackColor="Tomato"
                 BorderColor="Pink"
                 BorderWidth="1"
                 Font-Bold="true"
                 Font-Italic="true"
                 />
            <NextPrevStyle
                 Font-Italic="true"
                 Font-Names="Arial CE"
                 />
            <SelectedDayStyle
                 BackColor="OliveDrab"
                 BorderColor="Green"
                 />
            <OtherMonthDayStyle BackColor="IndianRed" />
            <SelectorStyle
                 BackColor="PaleVioletRed"
                 ForeColor="Snow"
                 Font-Names="Times New Roman Greek"
                 Font-Size="Small"
                 BorderColor="Pink"
                 BorderWidth="1"
                 />
            <TodayDayStyle BackColor="DarkOrchid" />
            <TitleStyle
                 BackColor="Navy"
                 Height="36"
                 Font-Size="Large"
                 Font-Names="Courier New Baltic"
                 />
        </asp:Calendar>
    </div>
    </form>
</body>
</html>
More asp.net examples