How to use MaskedEditExtender in asp.net ajax

MaskedEditExtender in asp.net ajax
UsingMaskedEditExtender.aspx

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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html>
<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "You submitted date: " + Convert.ToDateTime(TextBox1.Text).ToLongDateString();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Ajax MaskedEditExtender - How to use MaskedEditExtender in asp.net ajax</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:DarkBlue; font-style:italic;">Ajax Control Toolkit Example: Using MaskedEditExtender</h2>
        <hr width="600" align="left" color="LightBlue" />
        <asp:ScriptManager 
            ID="ScriptManager1"
            runat="server"
            >
        </asp:ScriptManager>
        <asp:Label 
            ID="Label1"
            runat="server"
            ForeColor="OrangeRed"
            Font-Size="Large"
            Font-Italic="true"
            Font-Bold="true"
            >
        </asp:Label>
        <br /><br />
        <asp:Label 
            ID="Label2"
            runat="server"
            Text="Arrival Date [mm/dd/yyyy] "
            ForeColor="Green"
            Font-Bold="true"
            >
        </asp:Label>
        <asp:TextBox 
            ID="TextBox1"
            runat="server"
            >
        </asp:TextBox>
        <cc1:MaskedEditExtender 
            ID="MaskedEditExtender1"
            runat="server"
            TargetControlID="TextBox1"
            Mask="99/99/9999"
            MaskType="Date"
            MessageValidatorTip="true"
            >
        </cc1:MaskedEditExtender>
        <cc1:MaskedEditValidator 
            ID="MaskedEditValidator1"
            runat="server"
            ControlToValidate="TextBox1"
            ControlExtender="MaskedEditExtender1"
            IsValidEmpty="false"
            EmptyValueMessage="Input date"
            InvalidValueMessage="date not valid"
            >
        </cc1:MaskedEditValidator>
        <br />
        <asp:Button 
            ID="Button1"
            runat="server"
            Text="Submit Arrival Date"            
            Font-Bold="true"
            ForeColor="Green"
            OnClick="Button1_Click"
            Height="40"
            />
    </div>
    </form>
</body>
</html>
Related asp.net ajax examples