protected void LOGINbtn_Click(object sender, EventArgs e) { if (txtusrname.Text != string.Empty && txtpass.Text != string.Empty) { Userbll bll = new Userbll(); int flag = bll.isvalidsignin(txtusrname.Text, txtpass.Text); if (flag == 1) { Session["User"] = txtusrname.Text; string uname = Session["User"].ToString(); bll.calculatepenaltyprice(uname); Response.Redirect("al/Home.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; } }