MembershipProvider.ChangePasswordQuestionAndAnswer Method

Processes a request to update the password question and answer for a membership user.

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

public abstract bool ChangePasswordQuestionAndAnswer (
	string username,
	string password,
	string newPasswordQuestion,
	string newPasswordAnswer
public abstract boolean ChangePasswordQuestionAndAnswer (
	String username, 
	String password, 
	String newPasswordQuestion, 
	String newPasswordAnswer
public abstract function ChangePasswordQuestionAndAnswer (
	username : String, 
	password : String, 
	newPasswordQuestion : String, 
	newPasswordAnswer : String
) : boolean
Not applicable.



The user to change the password question and answer for.


The password for the specified user.


The new password question for the specified user.


The new password answer for the specified user.

Return Value

true if the password question and answer are updated successfully; otherwise, false.

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

If the supplied user name and password are not valid, false is returned.

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

Community Additions