title: ASP.NET CustomValidator not working
body: <p>I have problem:
  I have a custom validator on my page which validates imieTextbox control. But it's not working. And I don't know why.</p>
  
  <p>This method comes from register.aspx.cs file:</p>
  
  <pre><code>protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
      {
  //of course here will be other validation logic but setting IsValid property ti false     is for example
          args.IsValid = false;
      }
  </code></pre>
  
  <p>And this comes fromregister.aspx file:</p>
  
  <pre><code>    &lt;asp:CustomValidator ID="CustomValidator1" runat="server" 
               ControlToValidate="imieTextbox" Display="Dynamic" 
               ErrorMessage="CustomValidator" 
               onservervalidate="CustomValidator1_ServerValidate" ValidateEmptyText="True" 
               ValidationGroup="A"&gt;&lt;/asp:CustomValidator&gt;
  </code></pre>
  
  <p>Submit button on Page has property CausesValidation set to TRUE and has Validation group A (like all validators on my page).
  All validators(requiredfield validators) works fine, but custom validators is not. Why is that? What am I doing wrong?</p>