I'm using Visual Studio 2015 Professional and I'm new to that version. So my question will be a simple one.................But I really do need help with this code. This is a login form code without a database. But each time I coded it I can't use else statement and it keep log in even I type a wrong password. So how do I fix this? Here is the code and the Screen shots
So this is the Code
Private Void BtnSI_Click(Object Sender, EventArgs e)
{
String Username = "Test";
String Password = "123";
if
(TxtUN.Text == Username && TxtPW.Text == Password);
MessageBox.Show("Login Successful","Login",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
}
else
{
MessageBox.Show("Please Check your Username and Password","Login",MessageBoxButtons.OK,MessageBoxIcon.Error);
}