System.Web.Security.Membership.ValidateUser Method

Verifies that the supplied user name and password are valid.

Syntax

public static bool ValidateUser (string username, string password)

Parameters

username
The name of the user to be validated.
password
The password for the specified user.

Returns

true if the supplied user name and password are valid; otherwise, false.

Remarks

Membership.ValidateUser(string, string) provides an easy way to verify a user name and password from the data source. Note that, if the username parameter is empty or null, an System.Web.HttpException is thrown.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0