protected void btnValidate_Click(object sender, EventArgs e) { BEStudent objbestudent = new BEStudent() { strPassword = txtCode.Text.Trim(), IntTransID = Convert.ToInt64(ViewState["TransID"]) }; BStudent objbstudent = new BStudent(); objbstudent.BValidateAuthenticationCode(objbestudent); if (objbestudent.IntResult == 1) { tbl1.Visible = false; tbl2.Visible = false; tbl3.Visible = true; lblresult.Text = "Code successfully verified."; BEStudent objBEStudent = new BEStudent(); BStudent objBStudent = new BStudent(); objBEStudent.IntTransID = Convert.ToInt64(ViewState["TransID"]); objBEStudent.IntType = 16; objBStudent.BUpdatePLTime(objBEStudent); Response.Redirect("Agreements.aspx?TransID=" + AppSecurity.Encrypt(ViewState["TransID"].ToString()), false); } else { tbl1.Visible = false; tbl2.Visible = true; tbl3.Visible = true; lblresult.Text = "Invalid code, please try again."; txtCode.Text = ""; } }