protected void btnGuardar_Click(object sender, ImageClickEventArgs e) { int intContador = 0; foreach (GridViewRow row in GridView1.Rows) { //TextBox txt; string Reqs_ItemSecuencia = GridView1.DataKeys[row.RowIndex].Values["Reqs_ItemSecuencia"].ToString(); // extrae key BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle(); DataTable dtResultado = new DataTable(); dtResultado = obj.USP_SEL_TBL_REQUERIMIENTO_ASIGNA_RESPONSABLE(Reqs_ItemSecuencia, ddlPersonal.SelectedValue.ToString()); intContador += 1; } if (intContador > 0) { requerimientos(); } }