protected void adLOGINbtn_Click(object sender, EventArgs e) { if (txtusrname.Text != string.Empty && txtpass.Text != string.Empty) { Userbll bll = new Userbll(); int flag = bll.isvalidadmnlogin(txtusrname.Text, txtpass.Text); if (flag == 1) { Session["Admin"] = txtusrname.Text; Response.Redirect("AdminofLib/adhomlib.aspx"); } else if (flag == 0) { errorlabel.Text = "Invalid Username or Password"; errorlabel.Visible = true; } } else { errorlabel.Text = "No Field can be Empty "; errorlabel.Visible = true; } }