System.Web.UI.WebControls Namespace
.NET Framework version 2.0
Provides a user interface for creating new Web site user accounts.
Visibility |
Name |
Value Type |
Accessibility |
public |
ActiveStepIndex
|
Int32 |
[ Get , Set ] |
public |
Answer
|
String |
[ Get , Set ] |
public |
AnswerLabelText
|
String |
[ Get , Set ] |
public |
AnswerRequiredErrorMessage
|
String |
[ Get , Set ] |
public |
AutoGeneratePassword
|
Boolean |
[ Get , Set ] |
public |
CompleteStep
|
CompleteWizardStep |
[ Get ] |
public |
CompleteSuccessText
|
String |
[ Get , Set ] |
public |
CompleteSuccessTextStyle
|
TableItemStyle |
[ Get ] |
public |
ConfirmPassword
|
String |
[ Get ] |
public |
ConfirmPasswordCompareErrorMessage
|
String |
[ Get , Set ] |
public |
ConfirmPasswordLabelText
|
String |
[ Get , Set ] |
public |
ConfirmPasswordRequiredErrorMessage
|
String |
[ Get , Set ] |
public |
ContinueButtonImageUrl
|
String |
[ Get , Set ] |
public |
ContinueButtonStyle
|
Style |
[ Get ] |
public |
ContinueButtonText
|
String |
[ Get , Set ] |
public |
ContinueButtonType
|
ButtonType |
[ Get , Set ] |
public |
ContinueDestinationPageUrl
|
String |
[ Get , Set ] |
public |
CreateUserButtonImageUrl
|
String |
[ Get , Set ] |
public |
CreateUserButtonStyle
|
Style |
[ Get ] |
public |
CreateUserButtonText
|
String |
[ Get , Set ] |
public |
CreateUserButtonType
|
ButtonType |
[ Get , Set ] |
public |
CreateUserStep
|
CreateUserWizardStep |
[ Get ] |
public |
DisableCreatedUser
|
Boolean |
[ Get , Set ] |
public |
DisplaySideBar
|
Boolean |
[ Get , Set ] |
public |
DuplicateEmailErrorMessage
|
String |
[ Get , Set ] |
public |
DuplicateUserNameErrorMessage
|
String |
[ Get , Set ] |
public |
EditProfileIconUrl
|
String |
[ Get , Set ] |
public |
EditProfileText
|
String |
[ Get , Set ] |
public |
EditProfileUrl
|
String |
[ Get , Set ] |
public |
Email
|
String |
[ Get , Set ] |
public |
EmailLabelText
|
String |
[ Get , Set ] |
public |
EmailRegularExpression
|
String |
[ Get , Set ] |
public |
EmailRegularExpressionErrorMessage
|
String |
[ Get , Set ] |
public |
EmailRequiredErrorMessage
|
String |
[ Get , Set ] |
public |
ErrorMessageStyle
|
TableItemStyle |
[ Get ] |
public |
HelpPageIconUrl
|
String |
[ Get , Set ] |
public |
HelpPageText
|
String |
[ Get , Set ] |
public |
HelpPageUrl
|
String |
[ Get , Set ] |
public |
HyperLinkStyle
|
TableItemStyle |
[ Get ] |
public |
InstructionText
|
String |
[ Get , Set ] |
public |
InstructionTextStyle
|
TableItemStyle |
[ Get ] |
public |
InvalidAnswerErrorMessage
|
String |
[ Get , Set ] |
public |
InvalidEmailErrorMessage
|
String |
[ Get , Set ] |
public |
InvalidPasswordErrorMessage
|
String |
[ Get , Set ] |
public |
InvalidQuestionErrorMessage
|
String |
[ Get , Set ] |
public |
LabelStyle
|
TableItemStyle |
[ Get ] |
public |
LoginCreatedUser
|
Boolean |
[ Get , Set ] |
public |
MailDefinition
|
MailDefinition |
[ Get ] |
public |
MembershipProvider
|
String |
[ Get , Set ] |
public |
Password
|
String |
[ Get ] |
public |
PasswordHintStyle
|
TableItemStyle |
[ Get ] |
public |
PasswordHintText
|
String |
[ Get , Set ] |
public |
PasswordLabelText
|
String |
[ Get , Set ] |
public |
PasswordRegularExpression
|
String |
[ Get , Set ] |
public |
PasswordRegularExpressionErrorMessage
|
String |
[ Get , Set ] |
public |
PasswordRequiredErrorMessage
|
String |
[ Get , Set ] |
public |
Question
|
String |
[ Get , Set ] |
public |
QuestionLabelText
|
String |
[ Get , Set ] |
public |
QuestionRequiredErrorMessage
|
String |
[ Get , Set ] |
public |
RequireEmail
|
Boolean |
[ Get , Set ] |
public |
SkipLinkText
|
String |
[ Get , Set ] |
public |
TextBoxStyle
|
Style |
[ Get ] |
public |
TitleTextStyle
|
TableItemStyle |
[ Get ] |
public |
UnknownErrorMessage
|
String |
[ Get , Set ] |
public |
UserName
|
String |
[ Get , Set ] |
public |
UserNameLabelText
|
String |
[ Get , Set ] |
public |
UserNameRequiredErrorMessage
|
String |
[ Get , Set ] |
public |
ValidatorTextStyle
|
Style |
[ Get ] |
public |
WizardSteps
|
WizardStepCollection |
[ Get ] |
|
The CreateUserWizard control provides the user interface for the MembershipProvider object that communicates with your Web site's user data store to create new user accounts in the data store. The CreateUserWizard relies on the MembershipProvider to create the user and disable them if necessary.
By default, the CreateUserWizard control will accept a user name and password from the Web site visitor. Based on the requirements of the site's MembershipProvider object, the CreateUserWizard control will optionally accept an e-mail address, represented by the Email property, and a password recovery confirmation question and answer, represented by Question and Answer. For a table showing all required and optional controls for CreateUserWizard, see CreateUserStep.
NOTE: If AutoGeneratePassword is set to true and the PasswordStrengthRegularExpression property is set in the application's Web.config file, you could potentially generate a password that does not pass the regular expression strength test. In this case, creating a user raises an error that indicates an invalid password.
When a user is created with the CreateUserWizard, the control interacts with the current MembershipProvider to accomplish the following tasks in order.
- Create a password if AutoGeneratePassword is set to true.
- Create the user in the data store that the MembershipProvider represents.
- Disable the user in the store if the DisableCreatedUser property is set to true.
You can extend the CreateUserWizard control to accept additional information by adding additional fields, or by adding additional steps before or after the provided templates in the CreateUserStep and CompleteStep properties.
NOTE: The CreateUserWizardStep step is the first step within the CreateUserWizard control, and is a required step. By default, the AllowReturn property is set to false to keep the user from returning to the CreateUserWizardStep step and accidentally attempting to create another user account with the same credentials. If EnableViewState is set to false, the AllowReturn property is not maintained in view state and you must include logic in your application to maintain the AllowReturn value.
CreateUserWizard control properties represented by text boxes, such as UserName, are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the TextChanged event triggered by the textboxes.
The CreateUserWizard control can optionally send e-mail messages to new users if you have configured an SMTP mail server to send e-mail. For more information, see the MailDefinition property.
NOTE: The CreateUserWizard control uses Internet e-mail services to send login information to users. There are inherent security risks with sending passwords in e-mail. You should determine whether these security risks are acceptable to your site.
When the CreateUserWizard control is not customized with templates, the AccessKey property of the CreateUserWizard control applies to the first text box in the control and the TabIndex property, which is applied to all text boxes of the control. If the CreateUserWizard control is customized with templates, then the AccessKey property and the TabIndex property are ignored. In this case, directly set the AccessKey property and the TabIndex property of each template child control.
CreateUserWizard control properties represented by text boxes, such as UserName and Password, are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the TextChanged event triggered by the textboxes.
NOTE: Setting the AutoGeneratePassword, MembershipProvider, or RequireEmail property recreates the child controls of the CreateUserWizard control, and their control state is lost in the process. To avoid this situation, explicitly maintain the control state of the CreateUserWizard control's child controls, or avoid putting controls inside of templates.
The following table lists the CreateUserWizard control style properties and explains which UI element each style property affects. For a list of which properties each style applies to, see the documentation for the individual style properties.
The CreateUserWizard control uses a validation group so that other fields on the same page as the CreateUserWizard control can be validated separately. By default, the ID property of the CreateUserWizard control is used as the name of the validation group. For example, a CreateUserWizard control with the ID "CreateUserWizard1" will use a validation group name of "CreateUserWizard1". If you want to set the validation group that the CreateUserWizard control is part of, you must template the control and change the validation group name.
Note that the CreateUserWizard class inherits from the Wizard class, which does not support special Microsoft Internet Explorer rendering for non-standard or quirks mode. The CreateUserWizard does not attempt to optimize rendering for non-standard Internet Explorer mode. To get the best Internet Explorer rendering using the CreateUserWizard control, use the XHTML doc type, which is added by default in Visual Web Developer and Visual Studio.
For examples illustrating use of this control, see the individual member types of this class. For syntax information, see CreateUserWizard in ASP.NET Syntax for Web Controls.
ASP.NET Login Controls CreateUserWizard Web Server Control