지금까지 ASP.Net 사이트에 2 개의 부분보기가있는 페이지가 있습니다. 각 페이지는 로그인 용이고 다른 하나는 로그인 용이고 다른 하나는 등록 용입니다.보다 많은 필드를 채우는 브라우저
두 가지 모두 훌륭합니다. 로그인 할 때 브라우저에서 내 비밀번호를 기억하도록 요청하면 다음에 로그인을 시도 할 때 등록 양식의 성 및 비밀번호가 이러한
여기
아래 이미지와 이름/로그인 폼에서 암호는 로그인의 모델
public class RegisterModel : IndexModel
{
[Required]
[Display(Name = "Email")]
[EmailAddress]
public string Email { get; set; }
[Required]
[Display(Name = "First Name")]
public string FirstName { get; set; }
[Required]
[Display(Name = "Last Name")]
public string LastName { get; set; }
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
}
public class LoginModel : IndexModel
{
[Required]
[Display(Name = "Email")]
[EmailAddress]
public string Email { get; set; }
[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
}
로그인
,745,151 부분을 레지스터 여기<% using (Html.BeginForm("Login", "Account", FormMethod.Post, new { id = "loginForm" }))
{ %>
<%: Html.AntiForgeryToken() %>
<%: Html.ValidationSummary(true) %>
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="loginEmail"><asp:Literal runat="server" Text="<%$ Resources:LOGIN_EMAIL %>"></asp:Literal></label>
<%: Html.TextBoxFor(m => m.Email, new {@class = "input-login-contacto redondo", id = "loginEmail"}) %>
</span>
</div>
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="loginPassword"><asp:Literal runat="server" Text="<%$ Resources:LOGIN_PASSWORD %>"></asp:Literal></label>
<%: Html.PasswordFor(m => m.Password, new {@class = "input-login-contacto redondo", id = "loginPassword"}) %>
</span>
</div>
<div class="12u">
<p class="remember"><%: Html.CheckBoxFor(m => m.RememberMe) %><asp:Literal runat="server" Text="<%$ Resources:LOGIN_REMEMBER %>"></asp:Literal></p>
</div>
<div class="row">
<div class="5u">
<input type="submit" name="login" value='<asp:Literal runat="server" Text="<%$ Resources:LOGIN_LOGINBTN %>"></asp:Literal>' class="submit-login-contacto fontsize-login redondo" />
</div>
<% } %>
<%: Html.Action("ExternalLoginsList", "Account", new { ReturnUrl = ViewBag.ReturnUrl }) %>
그리고는
<div class="row">
<div class="6u">
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="RegisterFirstName"><asp:Literal runat="server" Text="<%$ Resources:REGISTER_FIRSTNAME %>"></asp:Literal></label>
<%: Html.TextBoxFor(m => m.FirstName, new {id = "RegisterFirstName"}) %>
</span>
</div>
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="RegisterLastName"><asp:Literal runat="server" Text="<%$ Resources:REGISTER_LASTNAME %>"></asp:Literal></label>
<%: Html.TextBoxFor(m => m.LastName, new {id = "RegisterLastName"}) %>
</span>
</div>
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="RegisterPassword"><asp:Literal runat="server" Text="<%$ Resources:REGISTER_PASSWORD %>"></asp:Literal></label>
<%: Html.PasswordFor(m => m.Password, new {id = "RegisterPassword"}) %>
</span>
</div>
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="RegisterConfirmPassword"><asp:Literal runat="server" Text="<%$ Resources:REGISTER_CONFIRMPASS %>"></asp:Literal></label>
<%: Html.PasswordFor(m => m.ConfirmPassword, new {id = "RegisterConfirmPassword"}) %>
</span>
</div>
</div>
<div class="6u">
<div class="row">
<div class="12u">
<span class="input-with-caption fontsize-login">
<label for="RegisterEmail"><asp:Literal runat="server" Text="<%$ Resources:REGISTER_EMAIL %>"></asp:Literal></label>
<%: Html.TextBoxFor(m => m.Email, new {id = "RegisterEmail"}) %>
</span>
</div>
<div class="12u">
<%: Html.Captcha(5, "_CaptchaPartial") %>
</div>
</div>
</div>
</div>
<% } %>
부분 나는 이미 ID와 입력의 이름,하지만 지금까지, 아니 성공을 변경 한 등록입니다. 이것은 Chrome과 Firefox에서 발생하는 문제입니다 (적어도 시도한 문제 임).
아이디어가 부족합니다. 어떤 설교? 또한 <%: Html.PasswordFor(m => m.Password, new {id = "RegisterPassword", autocomplete="off"}) %>
http://css-tricks.com/snippets/html/autocomplete-off/
브라우저 것 :
코드로 작업을 시작하는 것이 좋습니다 ... 왜 이런 일이 발생하는지에 대한 많은 옵션이 있습니다. 쿠키를 하나, 브라우저 설정을 두 번째, 당신은 데이터베이스 등에서 값을 받고 ... –