Export (0) Print
Expand All
Expand Minimize

CreateUserWizard.RequireEmail Property

Gets or sets a value indicating whether an e-mail address is required for the Web site user.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[ThemeableAttribute(false)]
public virtual bool RequireEmail { get; set; }
<asp:CreateUserWizard RequireEmail="True|False" />

Property Value

Type: System.Boolean
true if an e-mail address is required; otherwise, false. The default value is true.

When the RequireEmail property is true, the CreateUserWizard will display a text box and an associated label for the user to enter an e-mail address. If the user does not enter an e-mail address, the EmailRequiredErrorMessage property will display an error message.

If the RequireEmail property is set to true and you are using templated content, the Email control is required and the CreateUserWizard throws an exception if the Email control is not found or is of the wrong type. If RequireEmail is set to false, no exception is thrown if the Email is not found. If it is of the wrong type, it is ignored.

NoteNote

If the membership provider specified in the MembershipProvider property requires a unique e-mail address for new users, you must set the RequireEmail property to true so that the UI for entering an e-mail address is displayed. Otherwise, the user will see the EmailRequiredErrorMessage but have no way to enter an e-mail address.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft