public void cargaRoles() { RolDAO rolDao = new RolDAO(); DropDawnRol.DataSource = rolDao.Consulta(); DropDawnRol.DataTextField = "tipoRol"; DropDawnRol.DataValueField = "id"; // Bind the data to the control. DropDawnRol.DataBind(); // Set the default selected item, if desired. DropDawnRol.SelectedIndex = 0; }