protected void btnDeleteSelected_Click(object sender, EventArgs e) { int EventID = int.Parse(Session[SessionContents.EventID].ToString()); //eventCode = Session[SessionContents.EventCode].ToString(); userVo = (UserVo)Session[SessionContents.UserVo]; customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; userId = userVo.UserId; customerId = customerVo.CustomerId; foreach (GridViewRow dr in gvConditionalAlerts.Rows) { CheckBox checkBox = (CheckBox)dr.FindControl("chkBx"); if (checkBox.Checked) { int EventSetupID = Convert.ToInt32(gvConditionalAlerts.DataKeys[dr.RowIndex].Value); if (alertsBo.DeleteConditionalEvent(EventSetupID)) { // Display Success Messages } } } // Success Message BindSubscribedEventsGridView(customerId, EventID); }