ASP.NET CustomValidator trying to match to System.EventHandler?

Posted by annakata on Stack Overflow See other posts from Stack Overflow or by annakata
Published on 2010-04-15T15:46:05Z Indexed on 2010/04/15 16:03 UTC
Read the original article Hit count: 321

Filed under:
|

I have markup so:

<asp:TextBox runat="server" ID="Accountname" />
<asp:CustomValidator runat="server" ControlToValidate="Accountname" OnServerValidate="Accountname_CheckUnique" meta:resourcekey="ACCOUNTNAME_UNAVAILABLE" />

Codebehind so:

protected void Accountname_CheckUnique(object source, ServerValidateEventArgs arguments)
{
    arguments.IsValid = Foo();     
}

Which was working just fine, and then without changing anything on the page ASP now insists:

No overload for 'Accountname_CheckUnique' matches delegate 'System.EventHandler'

Well no, and nor should it according to MSDN. It's late and I'm tired, anybody know how to fix this or point out the glaring flaw in my comprehension?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about customvalidator