<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomValidator.aspx.cs"
    Inherits="CustomValidator" %>

<html>
<head id="Head1" runat="server">
    <title>Exemplo com CustomValidator</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Digite: abc, e em seguida Chocolade<br />
        <asp:TextBox ID="txtEntrada" runat="server"></asp:TextBox>
        <asp:Button ID="btnValidar" runat="server" Text="Validar" />
        <br />
        <asp:CustomValidator ID="CustomValidator1" runat="server" OnServerValidate="CustomValidator1_ServerValidate"
            Text="Valor não consta na base de dados." ControlToValidate="txtEntrada"></asp:CustomValidator>
        <br />
        <br />
        <asp:Label ID="Label1" runat="server"></asp:Label>
    </div>
    </form>
</body>
</html>
