protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //Listado de los departamentos DataTable ConDep = DEP.ConsultarDepartamento(); for (int i = 0; i < ConDep.Rows.Count; i++) { Departamento.Items.Add(new ListItem(ConDep.Rows[i]["DEP_DETALLE"].ToString(), ConDep.Rows[i]["IDDEPARTAMENTO"].ToString())); } DataTable ConPro = prof.ConsultarProf(); for (int i = 0; i < ConPro.Rows.Count; i++) { Profesion.Items.Add(new ListItem(ConPro.Rows[i]["PRO_DETALLE"].ToString(), ConPro.Rows[i]["IDPROFESION"].ToString())); } } }