I plan to develop an ASP.NET server control to provide asynchronous verification of username availability for new user registrations. The control allows the developer to point it to the "username" text box and it will indicate whether the username is available. Like this example , but without the clumsy UpdatePanel.
One design decision that gives me headaches is to inherit from ScriptControl or BaseValidator .
By implementing it as a ScriptControl , I can simplify the work with the client part and easily localize it using resx.
However, I want to make sure that the validator is working correctly with respect to Page.IsValid. The only way I know this is to override BaseValidator and implement EvaluateIsValid() .
So my question is: how would you suggest structuring this control? Does BaseValidator inherit the best (only) way to get the validator part correctly, or can I do it in some other way?
source share