Html.Password:-

Html.Password helper renders password filed. It is similar to textbox helper but added to, it mask the password and does not retain the post value.

Example:

            
@Html.Password("UserPassword")
            
            

Strongly typed

            
 @Html.Password(m => m.UserPassword)
            
            

Output: