Last post Sep 10, 2005 03:29 AM by azamsharp
Sep 09, 2005 05:30 PM|new2aspdotnet|LINK
Sep 09, 2005 07:23 PM|JBartz|LINK
Sep 09, 2005 10:19 PM|smiling4ever|LINK
Here is what you want using ViewState
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Me.IsPostBack = False Then
Me.ViewState("PWAttempts") = 3
Me.ViewState("PWAttempts") -= 1
If Me.ViewState("PWAttempts") <= 0 Then
Me.lblHelp.InnerText = "No more attempts allowed!"
Me.txtPassword.Enabled = False
Me.lblHelp.InnerText = "Attempts remaining: " & _
Sep 09, 2005 11:26 PM|JBartz|LINK
To make it more secure you could also make a session variable to let the page know that the User is not to be allowed login attempts. That would work for either method, and would be slightly more secure, forcing them to dump the window and open another one
to make more attempts.
With the logging method you would be able to flag the account from repeated attempts and maybe generate an email to alert someone, be it admins or the User, maybe even ask them if they want their password emailed to them (assuming you have an email address
on file for that account).
Sep 10, 2005 03:29 AM|azamsharp|LINK