I spend a lot of my time, trying to understand why in a razor expression of
@HTML.PasswordFor( m => m.Password)
I can't set the value from the model the only solution that I found it's injecting the value by html properties like this
@HTML.PasswordFor( m => m.Password, new { value = Model.Password })
Am I doing something wrong?? is the correct helper?? this is the field model configuration
[Required(ErrorMessage = "La contraseña es obligatoria.")]
[StringLength(100, ErrorMessage = "El {0} debe tener al menos {2} caracteres de longitud.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Contraseña")]
public string Password { get; set; }
It's the only solution?