IsCurrentUser (WebSecurity Ref)

Checks if the currently logged in user is that user.

Syntax

WebSecurity.IsCurrentUser(string username);
Sponsored Links

Example

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

Returns either true or false.