Exposes and updates membership user information in the membership data store.
Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)
Thetype exposes the following members.
|MembershipUser()||Creates a new instance of a object for a class that inherits the class.|
|MembershipUser(String, String, Object, String, String, String, Boolean, Boolean, DateTime, DateTime, DateTime, DateTime, DateTime)||Creates a new membership user object with the specified property values.|
|Comment||Gets or sets application-specific information for the membership user.|
|CreationDate||Gets the date and time when the user was added to the membership data store.|
|Gets or sets the e-mail address for the membership user.|
|IsApproved||Gets or sets whether the membership user can be authenticated.|
|IsLockedOut||Gets a value indicating whether the membership user is locked out and unable to be validated.|
|IsOnline||Gets whether the user is currently online.|
|LastActivityDate||Gets or sets the date and time when the membership user was last authenticated or accessed the application.|
|LastLockoutDate||Gets the most recent date and time that the membership user was locked out.|
|LastLoginDate||Gets or sets the date and time when the user was last authenticated.|
|LastPasswordChangedDate||Gets the date and time when the membership user's password was last updated.|
|PasswordQuestion||Gets the password question for the membership user.|
|ProviderName||Gets the name of the membership provider that stores and retrieves user information for the membership user.|
|ProviderUserKey||Gets the user identifier from the membership data source for the user.|
|UserName||Gets the logon name of the membership user.|
|ChangePassword||Updates the password for the membership user in the membership data store.|
|ChangePasswordQuestionAndAnswer||Updates the password question and answer for the membership user in the membership data store.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetPassword()||Gets the password for the membership user from the membership data store.|
|GetPassword(String)||Gets the password for the membership user from the membership data store.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ResetPassword()||Resets a user's password to a new, automatically generated password.|
|ResetPassword(String)||Resets a user's password to a new, automatically generated password.|
|ToString||Returns the user name for the membership user. (Overrides Object::ToString().)|
|UnlockUser||Clears the locked-out state of the user so that the membership user can be validated.|
The object is used to represent a single membership user in the membership data store. It exposes information about the membership user such as the e-mail address, and provides functionality for the membership user such as the ability to change or reset his or her password.
If you are not familiar with the membership features of ASP.NET, see Introduction to Membership before continuing. For a list of other topics related to membership, see Managing Users by Using Membership.
A object is required by the UpdateUser method when you want to update the information for an existing membership user.
The following code example updates the e-mail address for a user.
This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.