protected void lnkremove_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)sender; GridViewRow row = (GridViewRow)btn.NamingContainer; int i = Convert.ToInt32(row.RowIndex); string custreservationid = gv_services.Rows[i].Cells[0].Text.ToString(); payment.Username = "******"; int updatedrecords = payment.AccessSelectedServices(Convert.ToInt32(custreservationid)); gv_services.DataSourceID = "sds_services"; gv_services.DataBind(); //put here the code for void // ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Openwindow", string.Format("window.open('confirmationpage.aspx?rn=1"), true); }