CreateUserWizard.DisableCreatedUser 属性
定义
获取或设置一个值,该值指示是否应允许新用户登录到网站。Gets or sets a value indicating whether the new user should be allowed to log on to the Web site.
public:
virtual property bool DisableCreatedUser { bool get(); void set(bool value); };
[System.Web.UI.Themeable(false)]
public virtual bool DisableCreatedUser { get; set; }
[<System.Web.UI.Themeable(false)>]
member this.DisableCreatedUser : bool with get, set
Public Overridable Property DisableCreatedUser As Boolean
属性值
如果允许新用户登录到网站,则为 true;否则为 false。true if the new user is allowed to log on to the Web site; otherwise, false. 默认值为 false。The default is false.
- 属性
注解
DisableCreatedUser属性确定是否在成员资格数据存储中将新创建的用户帐户标记为已禁用。The DisableCreatedUser property determines if the newly created user account will be marked as disabled in the membership data store. 将用户帐户标记为已禁用时,不允许帐户登录到网站。When user accounts are marked as disabled, the accounts are not allowed to log on to the Web site. 例如,如果您的网站允许新用户请求某个帐户,但在允许访问之前需要管理审批,则将 DisableCreatedUser 属性设置为 true 以禁用新创建的帐户,直到管理员批准该帐户。For example, if your Web site allows new users to request an account, but requires administrative approval before allowing access, set the DisableCreatedUser property to true to disable newly created accounts until an administrator approves the account.
如果 DisableCreatedUser 为 true ,则应将 LoginCreatedUser 属性设置为,以便不 false CreateUserWizard 会尝试登录到新用户。When DisableCreatedUser is true, you should set the LoginCreatedUser property to false so that the CreateUserWizard does not attempt to log on the new user.
无法通过主题或样式表主题设置此属性。This property cannot be set by themes or style sheet themes. 有关详细信息,请参阅 ThemeableAttribute 和 ASP.NET 主题和外观。For more information, see ThemeableAttribute and ASP.NET Themes and Skins.