MembershipUser::PasswordQuestion Property

 

Gets the password question for the membership user.

Namespace:   System.Web.Security
Assembly:  System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)

public:
property String^ PasswordQuestion {
	virtual String^ get();
}

Property Value

Type: System::String^

The password question for the membership user.

If RequiresQuestionAndAnswer is true, then the password answer for a membership user must be supplied to the GetPassword and ResetPassword methods. The PasswordQuestion serves as a reminder to the membership user of what his or her password answer is. Once the membership user has supplied a password answer, the answer value can be supplied to the GetPassword or ResetPassword method.

The following code example resets a user's password if he or she supplies the appropriate password answer. The PasswordQuestion for the user is displayed as a reminder to the user of the password answer.

System_CAPS_security Security Note

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: