Aqui esta el codigo:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language ="c#" runat ="server" >
   void EnviarFormulario(Object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            resultado.Text = "La página es válida";
        }
        else
        {
            resultado.Text = "La página No es válida";
        }
    }
    void validaParServidor(object source, ServerValidateEventArgs args)
    {
        try {
            int i = int.Parse(args.Value);
            args.IsValid = ((i % 2) == 0);
            if (i % 2 == 0)
            {
                args.IsValid = true;
            }
            else
            {
                args.IsValid = false;
            }
        }
        catch
        {
        args .IsValid =false ;
        }
     }
script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Validando Numeros Parestitle>
head>
<body>
    <form id="formulario" method= "post" runat="server">
    Número par: <asp:TextBox ID ="numero" runat ="server" >asp:TextBox>
   <asp:CustomValidator ID ="validador" runat = "server" ControlToValidate ="numero" ErrorMessage="Debe indicar un numero par" OnServerValidate ="validaParServidor" Display ="Dynamic" >
   asp:CustomValidator>
   <br />
   <asp:Button ID ="boton" runat="server" Text ="Enviar datos" OnClick ="EnviarFormulario" />
   <br />
   <asp:Label runat ="server" ID ="resultado">
   asp:Label>
   form>
body>
html>
Y asi queda al final, con la respectiva validación.
 



