Convert textbox type to password in asp.net mvc

后端 未结 11 2511
感情败类
感情败类 2020-12-18 18:13

How do I convert a textbox type to password in asp.net mvc?

11条回答
  •  庸人自扰
    2020-12-18 18:26

    Just write in Razor View i.e. in .cshtml file below line

      @Html.PasswordFor(m=>m.Password)
    

    Here m is model object and password is the password field name.

提交回复
热议问题