Guest User

Untitled

a guest
Aug 27th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. mvc generate captcha after failed login attempt
  2. <% using(Html.BeginForm()) {%>
  3. <%: Html.AntiForgeryToken() %>
  4. <%: Html.ValidationSummary() %>
  5. <label>Username:</label>
  6. <%: Html.TextBoxFor(m => m.Username) %>
  7. <br /><br />
  8. <label>Password:</label>
  9. <%: Html.PasswordFor(m => m.Password) %>
  10. <br /><br />
  11. <input type="submit" value="Login" />
  12. <%: Html.ActionLink("Register", "Register", "") %>
  13. <%: Html.ActionLink("Forgot Password", "Password", "") %>
  14. <%: Html.ActionLink("Forgot Username", "Username", "") %>
  15.  
  16.  
  17. <%: ReCaptcha.GetHtml(publicKey: "thisismykey", theme: "red") %>
  18.  
  19.  
  20. <% } %>
  21.  
  22. <%: if (Model.NumberofFailedLogins > 3) { %>
  23. <%: ReCaptcha.GetHtml(publicKey: "thisismykey", theme: "red") %>
  24. <% } %>
Add Comment
Please, Sign In to add comment