title: Password and confirm password does not match
body: <p>Password and confirm password does not match.<br>
  Even if you write the same password in both fields gives me error and says passwords does not match.</p>
  
  <p>This is how Account looks like:</p>
  
  <pre><code>    [Required]
      [StringLength(50, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
      [DataType(DataType.Password)]
      [Display(Name = "Password")]
      public string Password { get; set; }
  
      [DataType(DataType.Password)]
      [Display(Name = "Confirm password")]
      [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
      public string ConfirmPassword { get; set; }
  </code></pre>
  
  <p>And this is the register page:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.Password, new {@class = "control-label col-md-2"})
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.Password, new {htmlAttributes = new {@class = "form-control"}})
              @Html.ValidationMessageFor(model =&gt; model.Password, "", new {@class = "text-danger"})
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.ConfirmPassword, new {@class = "control-label col-md-2"})
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.ConfirmPassword, new {htmlAttributes = new {@class = "form-control"}})
              @Html.ValidationMessageFor(model =&gt; model.ConfirmPassword, "", new {@class = "text-danger"})
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I searched on google and this forum , but I have not found anything that works.</p>
  
  <p>Can someone help me ?</p>
  
  <p>Here is the database:
  <a href="http://i.stack.imgur.com/D86QV.png" rel="nofollow">http://i.stack.imgur.com/D86QV.png</a></p>
  
  <p>You can try to register: <a href="http://ursaciucadrian.somee.com/Home/Register?Length=4" rel="nofollow">http://ursaciucadrian.somee.com/Home/Register?Length=4</a></p>