i'm using the event below to change a default error message. so far i'm only using DuplicateUserName. my concern is the rest of the cases. i commented them all out so the errors would bubble up properly, then i uncommented them. i'm not sure what to do with them. leave them as is (all of the cases were auto-filled-in, btw, which is why they're there)? comment-out? delete the ones i'm not using? will the membership error(s) properly fire if all of these cases are here? i'm assuming they will because this is not an override but i'm really not sure. any advice on what to do with them?
protected void RegisterUser_CreateUserError(object sender, CreateUserErrorEventArgs e)
{
switch (e.CreateUserError)
{
case MembershipCreateStatus.DuplicateEmail:
break;
case MembershipCreateStatus.DuplicateProviderUserKey:
break;
case MembershipCreateStatus.DuplicateUserName:
RegisterUser.DuplicateUserNameErrorMessage = "Boo!";
break;
case MembershipCreateStatus.InvalidAnswer:
break;
case MembershipCreateStatus.InvalidEmail:
break;
case MembershipCreateStatus.InvalidPassword:
break;
case MembershipCreateStatus.InvalidProviderUserKey:
break;
case MembershipCreateStatus.InvalidQuestion:
break;
case MembershipCreateStatus.InvalidUserName:
break;
case MembershipCreateStatus.ProviderError:
break;
case MembershipCreateStatus.Success:
break;
case MembershipCreateStatus.UserRejected:
break;
default:
break;
}
}