title: How to use Customvalidator to check number
body: <p>I was trying to use <code>Customvalidator</code> to check value, and make sure that the value should be integer and also it can't be null. At beginning, I use the <code>RequiredValidator</code> and <code>RegularExpressionValidator</code> to achieve that. However, I could not put their errormessage in the same place, so I change my solution to use Customvalidator. But I still can't figure out it.</p>
  
  <p>Here is my code </p>
  
  <pre><code>protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
  {
       DateTime dt;
  
       if (string.IsNullOrEmpty(args.Value))
       {
           CustomValidator1.ErrorMessage = "Can not be empty";
           args.IsValid = false;
       }
  
       else if (????)
       {
          ...
       }
  }
  </code></pre>