private void CustomerTransactionDelete() { foreach (GridViewRow gvr in this.gvWERPProfileReject.Rows) { if (((CheckBox)gvr.FindControl("chkBxWerp")).Checked == true) { rejectedRecordsBo = new RejectedRecordsBo(); int StagingID = int.Parse(gvWERPProfileReject.DataKeys[gvr.RowIndex].Values["WERPProfileStagingId"].ToString()); rejectedRecordsBo.DeleteWERPRejectedProfile(StagingID); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedWERPProfile','login');", true); } } }