我有一个已关闭注册的ASP.NET MVC网站。这意味着该站点有管理员来创建新用户。问题是,每当管理员创建新用户时,都会要求他在浏览器中保存新用户的凭据。我在这里看到了很多有关自动完成的问题,尽管这似乎有所不同。我仍然希望最终用户登录时具有自动完成功能,因此,我只是不想让浏览器在创建新的最终用户时要求存储凭据。这并不是真正的安全问题,因为最终用户必须在首次登录时更改密码,这更多是一种不方便的行为,会影响管理员的用户体验。
主要浏览器是否对如何处理这种情况有任何支持?如果没有,是否有任何解决方法?
这是剃刀页面
@model MediaPortal.Models.RegisterViewModel
@{
ViewBag.Title = "New Customer";
}
<h2>New Customer</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.Customer, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Customer, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Customer, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
@Html.CheckBoxFor(m => m.Admin)
@Html.LabelFor(m => m.Admin)
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
}
<div>
@Html.ActionLink("Back To List", "Index")
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}