Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2007, 02:49 AM
Authorized User
 
Join Date: Aug 2006
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login


Friends,
I have written a code like this.I have to restrict the user from entering the wrong username/password more than three times. how to do this with modifying the below given code????
************************************************** **********
private void Login_Click(object sender, System.EventArgs e)
        {

        int count=0;
            if(TextBox1.Text.ToString()== "a" && TextBox2.Text.ToString()== "b")
            {
                Label1.Text="Successful";
            }


            else if(TextBox1.Text.ToString()!="a" || TextBox2.Text.ToString()!="b" )
                {
count+=1;
                            Label1.Text="Failed";
                    Label2.Text=count.ToString();



                }

            if(count >= 3 )
                {
    Label1.Text="Exceeds the attemt";
}


        }
        }
************************************************** ************
                         Thanks....
__________________
sumith





Similar Threads
Thread Thread Starter Forum Replies Last Post
login script: user can't hit "return" for login dmerrill Java Basics 13 July 14th, 2006 07:25 PM
Newbie Help. Login to unique login page per user Kainan Classic ASP Professional 10 May 3rd, 2005 07:47 AM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.