protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ImageButton ImgB = sender as ImageButton; GridViewRow gvRow = (GridViewRow)ImgB.NamingContainer; TxtNFantasia.Focus(); TxtNFantasia.Text = gvRow.Cells[0].Text; TxtRazonS.Text = gvRow.Cells[1].Text; TxtNombre.Text = gvRow.Cells[2].Text; TxtApellido.Text = gvRow.Cells[3].Text; TextTelefono.Text = gvRow.Cells[4].Text; TxtEmail.Text = gvRow.Cells[5].Text; TxtCuit.Text = gvRow.Cells[6].Text; TxtDirecion.Text = gvRow.Cells[7].Text; int i = 0; foreach (var item in ddlestado.Items) { if (item.ToString().ToLower() == gvRow.Cells[8].Text) { i = ddlestado.Items.IndexOf((ListItem)item); break; } } ddlestado.SelectedIndex = i; ddlestado.Items[i].Selected = true; ProvCuit = gvRow.Cells[6].Text; this.ModalPopupExtender1.Show(); Labelmgg.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login"] == null) { Response.Redirect("Login.aspx"); } ControlProveedor = (C_Proveedor)Session["ControlProveedor"]; TxtNFantasia.Focus(); }