protected void OnDelete_Permission(object sender, EventArgs e) { hidTAB.Value = "#tab3"; LinkButton lnk = sender as LinkButton; string recId = lnk.Attributes["RecId"]; try { if (mp.DeletePermission(Convert.ToDecimal(recId)) == true) { this.lblPermsnMsg.Text = MessageFormatter.GetFormattedSuccessMessage("Permission Deleted Succesfully!"); GridView2.DataBind(); } else { this.lblPermsnMsg.Text = MessageFormatter.GetFormattedErrorMessage("Error Deleted Permission!"); } } catch (Exception ex) { this.lblPermsnMsg.Text = MessageFormatter.GetFormattedErrorMessage("Error:" + ex.Message); } // Permssn.Attributes.Add("class", "active"); }