IsAccountLockedOut (WebSecurity Ref)

Checks if a specified user account is locked out, and it takes three arguments: username, password failure attempts, interval account locked out. It is an overloaded method.

Syntax

@WebSecurity.IsAccountLockedOut(string username, int allowPasswordAttempts, intIntervalSeconds);

@WebSecurity.IsAccountLockedOut(string username, Timespan allowPasswordAttempts, intIntervalSeconds);

Example

<!DOCTYPE html>
 
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title></title>
    </head>
    <body>
            
@WebSecurity.IsAccountLockedOut(WebSecurity.CurrentUserName, 4, 60);
    </body>
</html>

It will return true or false if the account is locked out.