Hello. Thanks for the help but it still doesn't work. About the onClick event i'm setting it:
public void myClick(object sender, EventArgs e){
if(txtUID.Text=="
[email protected]" && txtPWD.Text=="treyxxxx"){
lbl.Text = "Welcome waru";
}
else if((txtUID.Text=="
[email protected]" && txtPWD.Text=="vgsxxxxx") ||
(txtUID.Text=="
[email protected]" && txtPWD.Text=="nikifxxx")){
lbl.Text = "Welcome";
}
else{
lbl.Text="Wrong user name or password";
}
}
I'm sure there is no problem with the database. I noticed(using a label) that the DataReader keeps one record(one user name, password etc) whitch doesn't change when i click the button. Another strange thing is that once in a while it works!