protected void btnUpdate_Click(object sender, EventArgs e) { //Validate if (!Validated()) { return; } //Delete old record Business.User user = new Business.User(); user.DeleteByUserChannelRole(lblUserName.Text, ViewState["id"].ToString()); //Insert new record btnAssignPermission_Click1(null, null); //show hide button btnUpdate.Visible = false; btnCancel.Visible = false; btnAssignPermission.Visible = true; lblMessage.Text = "Update thành công"; lblMessage.Visible = true; }