protected void btnBook_Click(object sender, EventArgs e) { if (Convert.ToInt32(Session["Status"]) == 0) { Response.Redirect("SignUp.aspx"); } else { int id = Convert.ToInt32(txtbook.Text); Session["JourneyID"] = Convert.ToInt32(txtbook.Text); var res = b.CheckId(id); if (res == false) { Response.Write("Invalid Journey ID"); } else { //Response.Write("hello"); Response.Redirect("Ticket.aspx"); } } }