protected void gridExpedientes_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "AsociarExpedienteEspecifico") { int indice = Convert.ToInt32(e.CommandArgument); GridViewRow filaSeleccionada = gridConExpedientes.Rows[indice]; TableCell cedula = filaSeleccionada.Cells[1]; string cedulaSel = cedula.Text; ManejadorExpediente manejador = new ManejadorExpediente(); String mensaje = manejador.asociarCuenta(Session["CuentaParaAsociar"].ToString(), cedulaSel); if (mensaje == "Correcto") { List <BLExpediente> expedientes = new List <BLExpediente>(); manejador.cargarListaExpedientes(expedientes, true); gridConExpedientes.DataSource = expedientes; gridConExpedientes.DataBind(); mensajeAviso("success", "Cuenta Asociada correctamente"); } else { mensajeAviso("danger", "Ha ocurrido un error al asociar la Cuenta"); } } }