Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to disable the login button when the user enter more than 3times
Posted
Comments
[no name] 2-Jul-12 10:14am    
if loginattempts > 3 then loginbutton.enabled = false
Vitaly Tomilov 2-Jul-12 10:23am    
Development platform must be specified.
Sandeep Mewara 2-Jul-12 12:54pm    
+1

1 solution

You need to keep a counter for the number of logins. If the LoginCount is greater than 3, disable the login button. In the load event (it can be Page Load if it is ASP.NET or Form Load if it is Windows application), you need to check whether the LoginCount is less than 3, then you enable the button.
 
Share this answer
 
v2
Comments
Vitaly Tomilov 2-Jul-12 10:22am    
What page? Did the author even say it is a page UI? It could be any UI platform.
Pankaj Nikam 2-Jul-12 10:29am    
Oops! Let me modify the solution which matches WinForms and WebForms equally.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900