I am working in an MVC Application. In our Application. We have a Form which getting the Details for a user (client Details). Example, mild, First name, Last name, Password etc.. After Submit, in the Controller itself, we verify whether the entered MailID had already been registered or not. If already registered means, Return the same view with an error message. But all details are present in the Textbox, but the Password Textbox becomes empty. I want the Password text box with the value Which is Entered already.
public string Email { get; set; }
[Required(ErrorMessage = "FirstName is required")]
public string FirstName { get; set; }
public string LastName { get; set; }
[Required(ErrorMessage = "Password is required")]
[DataType(DataType.Password)]
[StringLength(40, MinimumLength = 6,
ErrorMessage = "Password must be between 6 and 12 characters.")]
public string Password { get; set; }