Q: Hide password in Post action - MVC I have a form with username and password field in my view,
@using (Html.BeginForm("Index", "Login", FormMethod.Post, new { @class = "form-signin", role = "form" }))
                {
                    @Html.TextBoxFor(m => m.Username, new { @class = "form-control", @placeholder ="Username"  })
                    @Html.ValidationMessageFor(m => m.Username, "", new { @class = "text-danger" })

                    @Html.PasswordFor(m => m.Password, new { @class = "form-control", @placeholder = "Password" })
                    @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })

                    <button class="btn btn-lg btn-primary btn-block" type="submit">
                        Sign in
                    </button> 
                 }  

I have a viewmodel for my login,
public class LoginViewModel
    {
        [Required, AllowHtml]
        public string Username { get; set; }

        [Required]
        [AllowHtml]
        [DataType(DataType.Password)]
        public string Password { get; set; }
    }

In my post method for submit button in the controller,
When I use the breakpoint in my controller, I can view the password, see the snapshot
enter image description here
Is there a way that I can make it invisible or dotted or hashed.
Any help is appreciated. 

A: Why not use a HTTPS page? It's encrypted on post..
