我有一个用户页面,在其中创建用户,默认情况下从用户身份加载登录名和密码字段。
有人可以向我解释为什么会这样吗?
这是代码:
@Html.LabelFor(model => model.LoginName)
@Html.TextBoxFor(model => model.LoginName, new { @maxlength = "30", @class = "form-control", placeholder = "Login" })
@Html.ValidationMessageFor(model => model.LoginName)
@Html.LabelFor(model => model.UserPassword)
@Html.PasswordFor(model => model.UserPassword, new { @maxlength = "50", @class = "form-control", placeholder = "Senha" })
@Html.ValidationMessageFor(model => model.UserPassword)