protected void listaPermisos_ItemEditing(object sender, ListViewEditEventArgs e) { try { listaPermisos.EditIndex = e.NewEditIndex; Label menu = (Label)listaPermisos.Items[e.NewEditIndex].FindControl("idMENUlist"); obj_permisos2 = new Permisos( dropdownRoles.SelectedValue, menu.Text ); if (obj_permisos2.ActualizarPermiso(obj_permisos2)) { ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", " swal('REGISTRO ALMACENADO', '', 'success');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", " swal('ERROR AL ALMACENAR', '', 'error');", true); } string currentPage = this.Page.Request.AppRelativeCurrentExecutionFilePath; Response.Redirect(currentPage); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", " swal('OCURRIO UNA EXCEPTION', '', 'error');", true); } }