I'm trying to set a custom validator that checks a customer form, that when they enter their username or email address, it can't be one that already exists in the database. The (incorrect) code that I have right now is:
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
if (args.Value == "")
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
I figure it's somewhere in that ballpark, I just need to find a way to actually look into the table and see if what the user enters already exists or not. Would greatly appreciate any help.
Thanks
...
Go to the complete details ...