title: Show password checkbox in ASP.NET MVC 4
body: <p>how do i show or hide password on click of a checkbox?
  this is my model class-</p>
  
  <pre><code>    public partial class user
  {
      [Required]
      public string username { get; set; }
      [Required]
      [DataType(DataType.Password)]
      public string password { get; set; }
  }
  </code></pre>
  
  <p>And in my View i have done this -</p>
  
  <pre><code>    @Html.EditorFor(model =&gt; model.password, new { htmlAttributes = new { @class = "form-control" } })
  </code></pre>
  
  <p>So now i want to add a checkbox that would show and hide the password.</p>
  
  <p>i searched that it can be done with the help of javascript easily in a webform by changing the 'type' from 'password' to 'text' on the click of checkbox but here in mvc i have mentioned my DataType in the model class. so is there any way that i can change it to text using jquery or javascript?</p>