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
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
Do While mynumber < 5
lblError.Text = "Incorrect user/pw"
mynumber = mynumber + 1
If mynumber > 5 Then
lblError.Text = "Too many tries. Try again later."