protected void gvLigasGeneradas_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "btnInfoMovimiento") { int index = Convert.ToInt32(e.CommandArgument.ToString()); GridViewRow Seleccionado = gvLigasGeneradas.Rows[index]; GridView valor = (GridView)sender; string dataKey = valor.DataKeys[Seleccionado.RowIndex].Value.ToString(); int i = ligasUrlsServices.lsLigasUrlsGridViewModel.IndexOf(ligasUrlsServices.lsLigasUrlsGridViewModel.First(x => x.IdReferencia == dataKey)); Guid UidLigaAsociado = ligasUrlsServices.lsLigasUrlsGridViewModel[i].UidLigaAsociado; if (UidLigaAsociado != Guid.Empty) { pagosTarjetaServices.DetalleLigaPromocion(UidLigaAsociado); } else { pagosTarjetaServices.DetalleLiga(dataKey); } gvDetalleLiga.DataSource = pagosTarjetaServices.lsPagosTarjetaDetalleGridViewModel; gvDetalleLiga.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "FormScript", "showModalDetalle()", true); } }