本文整理汇总了C#中System.Web.UI.WebControls.CreateUserErrorEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CreateUserErrorEventArgs类的具体用法?C# CreateUserErrorEventArgs怎么用?C# CreateUserErrorEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CreateUserErrorEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了CreateUserErrorEventArgs类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateUserError
public partial class CreateUserWizardErrorcs_aspx : System.Web.UI.Page
{
protected void OnCreateUserError(object sender, System.Web.UI.WebControls.CreateUserErrorEventArgs e)
{
switch (e.CreateUserError)
{
case MembershipCreateStatus.DuplicateUserName:
Label1.Text = "Username already exists. Please enter a different user name.";
break;
case MembershipCreateStatus.DuplicateEmail:
Label1.Text = "A username for that email address already exists. Please enter a different email address.";
break;
case MembershipCreateStatus.InvalidPassword:
Label1.Text = "The password provided is invalid. Please enter a valid password value.";
break;
case MembershipCreateStatus.InvalidEmail:
Label1.Text = "The email address provided is invalid. Please check the value and try again.";
break;
case MembershipCreateStatus.InvalidAnswer:
Label1.Text = "The password retrieval answer provided is invalid. Please check the value and try again.";
break;
case MembershipCreateStatus.InvalidQuestion:
Label1.Text = "The password retrieval question provided is invalid. Please check the value and try again.";
break;
case MembershipCreateStatus.InvalidUserName:
Label1.Text = "The user name provided is invalid. Please check the value and try again.";
break;
case MembershipCreateStatus.ProviderError:
Label1.Text = "The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator.";
break;
case MembershipCreateStatus.UserRejected:
Label1.Text = "The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.";
break;
default:
Label1.Text = "An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator.";
break;
}
}
}