<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ex3-6.aspx.cs" Inherits="Ex3_6" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Ex3-6</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        用户名：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:CustomValidator ID="CustomValidator1" runat="server" 
            ControlToValidate="TextBox1" ErrorMessage="用户名已被注册！" 
            onservervalidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
        <br />
        <asp:Button ID="Button1" runat="server" Text="检测用户名" />
    </div>
    </form>
</body>
</html>
