I have written this code for login page ,this code is working properlly now i want to give restriction that after 3 times on button click if login is faliure message will display "sorry today you have tried 3 times login " and on particular current date .plz write me the code dont give me
any web site link.Means i want to check on current date if a user enter wrong username and password 3 times it will display message
"sorry today you have tried 3 times login "
For LOGIN Protected void btn_click()
{
int count=0;
cmd=new sqlcommand("select count(*) from emp_registration where username='"+ txtusername.text.trim()+"' and password='"+ txtpassword.text.trim()+"'",cn);
count=Convert.ToInt16(cmd.ExecuteScalar());
Sesssion["username"]=txtusername.text;
If(count!=0)
{
Response.Redirect(aa.aspx);
}
else
{
Lbl.text="invalid"
}
}