protected void GvMV_SelectedIndexChanged(object sender, EventArgs e) { try { //Session["envioslide"] = "editar"; GridViewRow row = GvMV.SelectedRow; string Id_Info = ""; HiddenField cod = default(HiddenField); cod = (HiddenField)row.FindControl("Id_EmpresaInfo"); Id_Info = cod.Value; IdNosotrosInfo.Value = Id_Info; ServicioCom21.ServicioCom21 _administrador = new ServicioCom21.ServicioCom21(); DataSet ds = _administrador.Com21_consulta_nosotros_id(int.Parse(Id_Info)); if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { //seteo todos los valores de la consulta especifica Session["IdNosotrosInfo"] = dr[0].ToString(); this.IdNosotrosInfo.Value = dr[0].ToString(); this.txtinfo.Content = dr[1].ToString(); this.txttitulo.Text = dr[7].ToString(); if (Convert.ToBoolean(dr[8].ToString()) == true) { cbactivar.Checked = true; } else { cbactivar.Checked = false; } } btnedit.Visible = true; btninsert.Visible = false; } } catch (Exception Ex) { Console.WriteLine(Ex.Message); ScriptManager.RegisterStartupScript(upMantenimiento, upMantenimiento.GetType(), "click", "alert('Error Tecnico por favor espere unos minutos');", true); } }