Share via


SimpleMembershipProvider.ValidateUser Method

Verifies that the specified user account and password exist.

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

Syntax

'Declaration
Public Overrides Function ValidateUser ( _
    username As String, _
    password As String _
) As Boolean
'Usage
Dim instance As SimpleMembershipProvider 
Dim username As String 
Dim password As String 
Dim returnValue As Boolean 

returnValue = instance.ValidateUser(username, _
    password)
public override bool ValidateUser(
    string username,
    string password
)
public:
virtual bool ValidateUser(
    String^ username, 
    String^ password
) override
abstract ValidateUser : 
        username:string * 
        password:string -> bool  
override ValidateUser : 
        username:string * 
        password:string -> bool
public override function ValidateUser(
    username : String, 
    password : String
) : boolean

Parameters

  • username
    Type: System.String
    The name of the user account to validate.
  • password
    Type: System.String
    The password for the specified user.

Return Value

Type: System.Boolean
true if the specified user name and password exist, and if the account has been confirmed; otherwise, false.

Exceptions

Exception Condition
ArgumentException

username or password are null reference (Nothing in Visual Basic) or empty.

See Also

Reference

SimpleMembershipProvider Class

WebMatrix.WebData Namespace