protected void btnGuardar_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle(); DataTable dtResultado = new DataTable(); Reqs_ItemSecuencia = Request.QueryString["Reqs_ItemSecuencia"].ToString(); foreach (GridViewRow row in GridReq.Rows) { DropDownList ddlSubFamilia = ((DropDownList)row.FindControl("ddlSubFamilia")); DropDownList ddlMarca = ((DropDownList)row.FindControl("ddlMarca")); DropDownList ddlModelo = ((DropDownList)row.FindControl("ddlModelo")); TextBox txtCapacidad = ((TextBox)row.FindControl("txtCapacidad")); obj.UPD_SEL_TBL_REQUERIMIENTO_EQUIPO_OBRA( Reqs_ItemSecuencia, ddlSubFamilia.SelectedValue.ToString(), ddlMarca.SelectedValue.ToString(), ddlModelo.SelectedValue.ToString(), txtCapacidad.Text ); } cleanMessage = "Actualización satisfactoria"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); }