protected void logi_Click(object sender, EventArgs e) { if (username.Text != "" && password.Text != "") { hashed = MD5Hash(password.Text.Trim()); if (hashed != "") { bus.user_name = username.Text; bus.password = hashed; int res = bus.check_login(); if (res == 1) { invalid.Visible = false; set_sessions(); } else { username.Text = ""; password.Text = ""; invalid.Visible = true; } } else { username.Text = ""; password.Text = ""; invalid.Visible = true; } } else { } }