WebSecurity.GetPasswordChangedDate Method

Returns the date and time when the password was most recently changed for the specified membership account.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

Public Shared Function GetPasswordChangedDate ( _
	userName As String _
) As DateTime
Dim userName As String
Dim returnValue As DateTime

returnValue = WebSecurity.GetPasswordChangedDate(userName)


Type: System.String
The user name of the account.

Return Value

Type: System.DateTime
The date and time when the password was most recently changed, or DateTime.MinValue if the password has not been changed for this account.


The SimpleMembershipProvider.Initialize(String, NameValueCollection) method was not called.


The InitializeDatabaseConnection method was not called.


The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.