FilteredTextBoxExtender FilterMode ValidChars in asp.net ajax

Ajax FilteredTextBoxExtender FilterMode ValidChars
UsingFilterModeValidChars.aspx

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

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

<!DOCTYPE html>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    { 
        if(!Page.IsPostBack)
        {
            TextBox1.Font.Name = "Comic Sans MS";
            TextBox1.Font.Bold = true;
            TextBox1.Font.Size = FontUnit.Medium;
            TextBox1.ForeColor = System.Drawing.Color.DeepPink;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "Your City Code: " + TextBox1.Text;
    }    
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Ajax FilteredTextBoxExtender FilterMode ValidChars - How to use</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:SkyBlue; font-style:italic;">Ajax FilteredTextBoxExtender Example: Using FilterMode ValidChars</h2>
        <hr width="650" align="left" color="LightBlue" />
        <asp:ScriptManager 
            ID="ScriptManager1"
            runat="server"
            >
        </asp:ScriptManager>
        <cc1:FilteredTextBoxExtender 
            ID="FilteredTextBoxExtender1"
            runat="server"
            TargetControlID="TextBox1"
            FilterType="Numbers"
            FilterMode="ValidChars"
            >
        </cc1:FilteredTextBoxExtender>
        <br />
        <asp:Label 
            ID="Label1"
            runat="server"
            ForeColor="DeepPink"
            Height="70"
            Font-Size="X-Large"
            Font-Bold="true"
            >
        </asp:Label>
        <br />
        <asp:Label 
            ID="Label2" 
            runat="server"
            Font-Italic="true"
            ForeColor="SeaGreen"
            Font-Names="Comic Sans MS"
            Font-Size="Large"
            Text="City Code (Only Numbers)"
            >
        </asp:Label>
        <asp:TextBox 
            ID="TextBox1"
            runat="server"
            >
        </asp:TextBox>
        <br /><br />
        <asp:Button 
            ID="Button1"
            runat="server"
            ForeColor="SeaGreen"
            OnClick="Button1_Click"
            Text="Submit City Code"
            Font-Bold="true"
            Height="40"
            />
    </div>
    </form>
</body>
</html>
Related asp.net ajax examples