コード例 #1
0
        public void LlenarComboSeleccion()
        {
            consu = new Consumo();
            List <Catalogo> cata = null;

            try
            {
                cata = consu.ObtenerCatalogo();
                ViewState["lala"] = cata.ToList();
                if (cata.Count > 0 && cata != null)
                {
                    CmbSelecPeli.DataSource = cata;
                    CmbSelecPeli.TextField  = "NOMBRE";
                    CmbSelecPeli.ValueField = "IDPELICULA";
                    CmbSelecPeli.DataBind();
                }
                else
                {
                    CmbSelecPeli.Enabled = false;
                }
            }catch (Exception ex)
            {
            }
            //CmbSelecPeli
        }