protected void Button1_Click(object sender, EventArgs e) { Pool obj = new Pool(); int status; DataSet ds = obj.ActiveBooking(Convert.ToInt32(Session["LogIn"]), out status); grdActivBooking.DataSource = ds; grdActivBooking.DataBind(); if (status == 0) { Response.Write("<script>alert('No Current Booking For You')</script>"); Server.Transfer("MyTrip.aspx"); } grdMyBooking.Visible = false; }