Friday, November 22, 2013

Login Code Not Working


try
{
comm.CommandText = "SELECT COUNT(*) FROM Accounts WHERE username = '" + txtUsername.Text + "' and passcode = '" + txtPasscode.Text + "'";;
int count = comm.ExecuteScalar();
if (count > 0)
{
this.Frame.Navigate(typeof(HomeStudent));
}
else
{
//LOGIN FAILED
}
}

catch
{

}












A.m.a.L Hashim

Microsoft Most Valuable Professional

My Blog - Dot Net Goodies

No comments:

Post a Comment