ASP.NET CustomValidator trying to match to System.EventHandler?
- by annakata
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?