protected void btnDelete_Click(object sender, EventArgs e) { Hotel a = (Hotel)Session["emailH"]; string id = a.OrgEmail; int row = HotelDB.deleteHotel(id); //to delete the row from database Response.Redirect("Homepage.aspx"); //to redirect to the homepage }