当用户输入密码时,如何设置TextBoxFor
隐藏文字?
@Html.TextBoxFor(model => model.Password.CurrentPassword, new { @class = "form-control", @placeholder = "Current Password", autocomplete = "off", name = "nconfirm" })
答案 0 :(得分:3)
答案 1 :(得分:1)
@Html.PasswordFor(model => model.Password, new {@class="form-control", placeholder="Password"})