ASP.NET Syntax ASP.NET Syntax for Web Controls
Provides a user interface for creating new Web site user accounts.
Declarative Syntax
<asp:CreateUserWizard
AccessKey = "string"
ActiveStepIndex = integer
Answer = "string"
AnswerLabelText = "string"
AnswerRequiredErrorMessage = "string"
AutoGeneratePassword = "True | False"
BackColor = "color name | #dddddd"
BorderColor = "color name | #dddddd"
BorderStyle = "NotSet | None | Dotted | Dashed | Solid | Double | Groove |
Ridge | Inset | Outset"
BorderWidth = size
CancelButtonImageUrl = "uri"
CancelButtonText = "string"
CancelButtonType = "Button | Image | Link"
CancelDestinationPageUrl = "uri"
CellPadding = integer
CellSpacing = integer
CompleteSuccessText = "string"
ConfirmPasswordCompareErrorMessage = "string"
ConfirmPasswordLabelText = "string"
ConfirmPasswordRequiredErrorMessage = "string"
ContinueButtonImageUrl = "uri"
ContinueButtonText = "string"
ContinueButtonType = "Button | Image | Link"
ContinueDestinationPageUrl = "uri"
CreateUserButtonImageUrl = "uri"
CreateUserButtonText = "string"
CreateUserButtonType = "Button | Image | Link"
CssClass = "string"
DisableCreatedUser = "True | False"
DisplayCancelButton = "True | False"
DisplaySideBar = "True | False"
DuplicateEmailErrorMessage = "string"
DuplicateUserNameErrorMessage = "string"
EditProfileIconUrl = "uri"
EditProfileText = "string"
EditProfileUrl = "uri"
Email = "string"
EmailLabelText = "string"
EmailRegularExpression = "string"
EmailRegularExpressionErrorMessage = "string"
EmailRequiredErrorMessage = "string"
Enabled = "True | False"
EnableTheming = "True | False"
EnableViewState = "True | False"
FinishCompleteButtonImageUrl = "uri"
FinishCompleteButtonText = "string"
FinishCompleteButtonType = "Button | Image | Link"
FinishDestinationPageUrl = "uri"
FinishPreviousButtonImageUrl = "uri"
FinishPreviousButtonText = "string"
FinishPreviousButtonType = "Button | Image | Link"
Font-Bold = "True | False"
Font-Italic = "True | False"
Font-Names = "string"
Font-Overline = "True | False"
Font-Size = "string | Smaller | Larger | XX-Small | X-Small | Small |
Medium | Large | X-Large | XX-Large"
Font-Strikeout = "True | False"
Font-Underline = "True | False"
ForeColor = "color name | #dddddd"
HeaderText = "string"
Height = size
HelpPageIconUrl = "uri"
HelpPageText = "string"
HelpPageUrl = "uri"
ID = "string"
InstructionText = "string"
InvalidAnswerErrorMessage = "string"
InvalidEmailErrorMessage = "string"
InvalidPasswordErrorMessage = "string"
InvalidQuestionErrorMessage = "string"
LoginCreatedUser = "True | False"
MailDefinition-BodyFileName = "uri"
MailDefinition-CC = "string"
MailDefinition-From = "string"
MailDefinition-IsBodyHtml = "True | False"
MailDefinition-Priority = "Normal | Low | High"
MailDefinition-Subject = "string"
MembershipProvider = "string"
OnActiveStepChanged = "ActiveStepChanged event handler"
OnCancelButtonClick = "CancelButtonClick event handler"
OnContinueButtonClick = "ContinueButtonClick event handler"
OnCreatedUser = "CreatedUser event handler"
OnCreateUserError = "CreateUserError event handler"
OnCreatingUser = "CreatingUser event handler"
OnDataBinding = "DataBinding event handler"
OnDisposed = "Disposed event handler"
OnFinishButtonClick = "FinishButtonClick event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnNextButtonClick = "NextButtonClick event handler"
OnPreRender = "PreRender event handler"
OnPreviousButtonClick = "PreviousButtonClick event handler"
OnSendingMail = "SendingMail event handler"
OnSendMailError = "SendMailError event handler"
OnSideBarButtonClick = "SideBarButtonClick event handler"
OnUnload = "Unload event handler"
PasswordHintText = "string"
PasswordLabelText = "string"
PasswordRegularExpression = "string"
PasswordRegularExpressionErrorMessage = "string"
PasswordRequiredErrorMessage = "string"
Question = "string"
QuestionLabelText = "string"
QuestionRequiredErrorMessage = "string"
RequireEmail = "True | False"
runat = "server"
SkinID = "string"
SkipLinkText = "string"
StartNextButtonImageUrl = "uri"
StartNextButtonText = "string"
StartNextButtonType = "Button | Image | Link"
StepNextButtonImageUrl = "uri"
StepNextButtonText = "string"
StepNextButtonType = "Button | Image | Link"
StepPreviousButtonImageUrl = "uri"
StepPreviousButtonText = "string"
StepPreviousButtonType = "Button | Image | Link"
Style = "string"
TabIndex = integer
ToolTip = "string"
UnknownErrorMessage = "string"
UserName = "string"
UserNameLabelText = "string"
UserNameRequiredErrorMessage = "string"
Visible = "True | False"
Width = size
>
<CancelButtonStyle />
<CompleteSuccessTextStyle />
<ContinueButtonStyle />
<CreateUserButtonStyle />
<ErrorMessageStyle />
<FinishCompleteButtonStyle />
<FinishNavigationTemplate>
<!-- child controls -->
</FinishNavigationTemplate>
<FinishPreviousButtonStyle />
<HeaderStyle />
<HeaderTemplate>
<!-- child controls -->
</HeaderTemplate>
<HyperLinkStyle />
<InstructionTextStyle />
<LabelStyle />
<MailDefinition
BodyFileName = "uri"
CC = "string"
From = "string"
IsBodyHtml = "True | False"
Priority = "Normal | Low | High"
Subject = "string"
>
<EmbeddedObjects>
<asp:EmbeddedMailObject
Name = "string"
Path = "uri"
/>
</EmbeddedObjects>
</MailDefinition>
<NavigationButtonStyle />
<NavigationStyle />
<PasswordHintStyle />
<SideBarButtonStyle />
<SideBarStyle />
<SideBarTemplate>
<!-- child controls -->
</SideBarTemplate>
<StartNavigationTemplate>
<!-- child controls -->
</StartNavigationTemplate>
<StartNextButtonStyle />
<StepNavigationTemplate>
<!-- child controls -->
</StepNavigationTemplate>
<StepNextButtonStyle />
<StepPreviousButtonStyle />
<StepStyle />
<TextBoxStyle />
<TitleTextStyle />
<ValidatorTextStyle />
<WizardSteps>
<asp:TemplatedWizardStep
AllowReturn = "True | False"
ContentTemplateContainer = "string"
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
OnActivate = "Activate event handler"
OnDataBinding = "DataBinding event handler"
OnDeactivate = "Deactivate event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
StepType = "Auto | Complete | Finish | Start | Step"
Title = "string"
Visible = "True | False"
>
<ContentTemplate>
<!-- child controls -->
</ContentTemplate>
<CustomNavigationTemplate>
<!-- child controls -->
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:WizardStep
AllowReturn = "True | False"
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
OnActivate = "Activate event handler"
OnDataBinding = "DataBinding event handler"
OnDeactivate = "Deactivate event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
StepType = "Auto | Complete | Finish | Start | Step"
Title = "string"
Visible = "True | False"
/>
</WizardSteps>
</asp:CreateUserWizard>
For information on the individual members of this class, see CreateUserWizard in the class library.
The CreateUserWizard control provides the user interface for the MembershipProvider object that communicates with the user account data store for your Web site to create new user accounts in the data store. The CreateUserWizard relies on the MembershipProvider to create, authenticate, and disable user accounts.
The following example shows how to use the CreateUserWizard control with the default templates. This page will create a new Web site user account with the default MembershipProvider object for the site.
<form runat="server">
<asp:createuserwizard id="Createuserwizard1" runat="server">
<wizardsteps>
<asp:createuserwizardstep runat="server" title = "Sign Up for Your New Account">
<contenttemplate>
<table>
<tr>
<td>
<table style = "height: 100%; width: 100%;">
<tr>
<td align = "center" colspan = "2">
Sign Up for Your New Account</td></tr>
<tr>
<td align = "right">
<asp:label runat="server" associatedcontrolid="UserName"
id="UserNameLabel">User Name:</asp:label></td>
<td>
<asp:textbox runat="server" id="UserName" />
<asp:requiredfieldvalidator runat="server"
controltovalidate = "UserName" tooltip = "User Name is required."
id="UserNameRequired" validationgroup = "Createuserwizard1"
errormessage = "User Name is required.">*</asp:requiredfieldvalidator>
</td></tr>
<tr>
<td align = "right">
<asp:label runat="server" associatedcontrolid="Password"
id="PasswordLabel">Password:</asp:label></td>
<td>
<asp:textbox runat="server" textmode = "Password" id="Password" />
<asp:requiredfieldvalidator runat="server"
controltovalidate = "Password" tooltip = "Password is required."
id="PasswordRequired" validationgroup = "Createuserwizard1"
errormessage = "Password is required.">*</asp:requiredfieldvalidator>
</td></tr>
<tr>
<td align = "right">
<asp:label runat="server" associatedcontrolid="ConfirmPassword"
id="ConfirmPasswordLabel">Confirm Password:</asp:label></td>
<td>
<asp:textbox runat="server" textmode = "Password" id="ConfirmPassword" />
<asp:requiredfieldvalidator runat="server"
controltovalidate = "ConfirmPassword" tooltip = "Confirm Password is required."
id="ConfirmPasswordRequired" validationgroup = "Createuserwizard1"
errormessage = "Confirm Password is required.">*</asp:requiredfieldvalidator>
</td></tr>
<tr>
<td align = "right">
<asp:label runat="server" associatedcontrolid="Email"
id="EmailLabel">Email:</asp:label></td>
<td>
<asp:textbox runat="server" id="Email" />
<asp:requiredfieldvalidator runat="server"
controltovalidate = "Email" tooltip = "Email is required."
id="EmailRequired" validationgroup = "Createuserwizard1"
errormessage = "Email is required.">*</asp:requiredfieldvalidator>
</td></tr>
<tr>
<td align = "right">
<asp:label runat="server" associatedcontrolid="Question"
id="QuestionLabel">Security Question:</asp:label></td>
<td>
<asp:textbox runat="server" id="Question" />
<asp:requiredfieldvalidator runat="server"
controltovalidate = "Question" tooltip = "Security question is required."
id="QuestionRequired" validationgroup = "Createuserwizard1"
errormessage = "Security question is required.">*</asp:requiredfieldvalidator>
</td></tr>
<tr>
<td align = "right">
<asp:label runat="server" associatedcontrolid="Answer"
id="AnswerLabel">Security Answer:</asp:label></td>
<td>
<asp:textbox runat="server" id="Answer" />
<asp:requiredfieldvalidator runat="server"
controltovalidate = "Answer" tooltip = "Security answer is required."
id="AnswerRequired" validationgroup = "Createuserwizard1"
errormessage = "Security answer is required.">*</asp:requiredfieldvalidator>
</td></tr>
<tr>
<td align = "center" colspan = "2">
<asp:comparevalidator runat="server" display = "Dynamic"
errormessage = "The Password and Confirmation Password must match."
controltocompare = "ConfirmPassword" controltovalidate = "Password"
id="PasswordCompare" validationgroup = "Createuserwizard1" />
</td></tr>
<tr>
<td align = "center" colspan = "2" style = "color: Red;">
<asp:literal runat="server" enableviewstate = "False" id="FailureText" />
</td></tr>
</table>
</td></tr>
</table>
</contenttemplate>
</asp:createuserwizardstep>
<asp:completewizardstep runat="server" title = "Complete">
<contenttemplate>
<table>
<tr>
<td>
<table style = "height: 100%; width: 100%;">
<tr>
<td align = "center" colspan = "2">Complete</td></tr>
<tr>
<td>Your account has been successfully created.</td></tr>
<tr>
<td align = "right" colspan = "2">
<asp:button runat="server" validationgroup = "Createuserwizard1"
commandname = "Continue"
id="ContinueButton" causesvalidation = "False"
text = "Continue" />
</td></tr>
</table>
</td></tr>
</table>
</contenttemplate>
</asp:completewizardstep>
</wizardsteps>
</asp:createuserwizard>
</form>
CreateUserWizard Class CreateUserWizard Web Server Control