protected void submit_Click(object sender, EventArgs e) { clsregister obj = new clsregister(); clsregistrationprp objprp = new clsregistrationprp(); objprp.email = username.Text; objprp.password = password.Text; Label1.Visible = true; try { Int32 b = obj.logincheck(objprp); Int32 a = obj.logincheck1(objprp); if (b == -4) { Session["cod"] = a; Response.Redirect("next/principal/homepr.aspx"); } else if (b == -3) { Session["cod"] = a; Response.Redirect("next/hod/homeh.aspx"); } else if (b == -2) { Session["cod"] = a; Response.Redirect("next/cc/homecc.aspx"); } else { Label1.Text = "error"; } } catch (Exception exp) { Label1.Text = "INVALID USERNAME PASSWORD"; } }