protected void btnLogin_Click(object sender, EventArgs e) { if (txtusername.Text == null && txtpassword.Text == null) { Response.Write("<script>alert('Username and password not empty')</script>"); } else { LoginBUS logacc = new LoginBUS(); if (logacc.CheckLogBUS(txtusername.Text, txtpassword.Text)) { Response.Write("<script>alert('Login success')</script>"); Response.Redirect("homefe.aspx"); } else { Response.Write("<script>alert('Login Fail')</script>"); } } }