MembershipProvider.ChangePassword Method

Processes a request to update the password for a membership user.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

public abstract bool ChangePassword (
	string username,
	string oldPassword,
	string newPassword
public abstract boolean ChangePassword (
	String username, 
	String oldPassword, 
	String newPassword
public abstract function ChangePassword (
	username : String, 
	oldPassword : String, 
	newPassword : String
) : boolean
Not applicable.



The user to update the password for.


The current password for the specified user.


The new password for the specified user.

Return Value

true if the password was updated successfully; otherwise, false.

Takes, as input, a user name, a current password, and a new password, and updates the password in the data source if the supplied user name and current password are valid.

For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0