protected void ButtonDeleteRole_Click(object sender, EventArgs e) { bool isRoleDeleted = false; string applicationName = this.DropDownApplicationsDeleteRole.SelectedValue; List <string> checkedRoles = new List <string>(); foreach (ListItem role in this.CheckBoxListApplicationRoles.Items) { if (role.Selected) { checkedRoles.Add(role.Value); } } isRoleDeleted = RolesBLL.DeleteRoleForApplication(applicationName, checkedRoles); if (isRoleDeleted) { Utility.Clear(this.UpdatePanelDeleteRole.Controls); Utility.ShowMessageAfterPOST(Page, Utility.GetStatusMessage(StatusMessages.SuccessfullDeleteRole)); PopulateGridViewApplicationsRoles(); } }