I am basically looking to lock out a visitor if they attempt to log in too many times. This is the code in its simplicity. What am I missing? It doesn't work.
Partial Class logins_Default
Inherits System.Web.UI.Page
Public mynumber As Integer = 0
Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
If txtUser.Text = "user" And txtPassword.Text = "pw" Then
Response.Redirect("somepage.aspx")
Else
Do While mynumber < 5
lblError.Text = "Incorrect user/pw"
mynumber = mynumber + 1
Response.Write(mynumber)
Loop
End If
If mynumber > 5 Then
lblError.Text = "Too many tries. Try again later."
End If
End Sub
End Class