Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7795793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:10:16+00:00 2026-06-01T23:10:16+00:00

Private Sub CheckLogin() If Failed == 3 ‘show recapacha If Page.IsValid Then CheckLogin2() End

  • 0
Private Sub CheckLogin()

If Failed == 3
    'show recapacha
    If Page.IsValid Then
    CheckLogin2()
    End If
End If
Else
Try
    'login code
    ' on password fail Failed+1
End Try
End If

What I have is a login form but I do not want to show the recapacha till there are 3 invalid login attempts. I’m not sure as to the best way to do that. Above is some mockup code to get an idea on where I am heading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:10:18+00:00Added an answer on June 1, 2026 at 11:10 pm
    Private Sub CheckLogin()
    
        'after the three attempts 
        If (LoginCount = 3) Then
            'show captcha code
            Return
        End If
        'your login code if found unsuccessful increase the counter
        LoginCount += 1
    
    End Sub
    

    Property to increase the counter and check the number of login
    attempts

    Public Property LoginCount() As Integer
        Get
            If (ViewState("LoginCount") = Nothing) Then
                ViewState("LoginCount") = 0
            End If
            Return DirectCast(ViewState("LoginCount"), Integer)
        End Get
        Set(ByVal value As Integer)
            ViewState("LoginCount") = value
        End Set
    End Property
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Private Sub Workbook_Open() Sheets(01).Delete Sheets(02).Copy before:=Sheets(02) Sheets(02 (2)).Name = 01 Form1.Show End Sub Form1
I have the following code: Private Sub Tabstrip1_Click() Form2.Show vbModal, Me end sub Form2
Private Sub importClipboard_Click() Dim data As Collection data = getClipboardData() ...do something... End Sub
Private Sub CheckBox9_Click() If CheckBox9.Value = True Then CheckBox9.Caption = Done ActiveWorkbook.Sheets(Well Planning Checklist).Tab.ColorIndex
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 6 Then Call calc09() Sub
I'm using the Winsock control: Private Sub Form_Load() Winsock1.Connect stackoverflow.com, 80 End Sub Private
Partial Class Details Inherits System.Web.UI.Page Private Sub Hiding() Dim Panel1 As Panel Dim Panel2
Private Sub Command1_Click() Dim x As Integer For x = 1 To 100 List1.AddItem
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Dim allowedChars
Private Sub Command1_Click() Dim dom As New DOMDocument Dim http As New XMLHTTP Dim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.