protected void LlenaCombo() { ViewState["Combos"] = new Combos(); RepositorioBase <Productos> repositorioBase = new RepositorioBase <Productos>(); ProductoIdDropDownList.DataSource = repositorioBase.GetList(t => true); ProductoIdDropDownList.DataValueField = "ProductoId"; ProductoIdDropDownList.DataTextField = "NombreProducto"; ProductoIdDropDownList.DataBind(); }
private void LlenaDropDown() { RepositorioBase <Productos> repositorio = new RepositorioBase <Productos>(); ProductoIdDropDownList.DataSource = repositorio.GetList(p => true); ProductoIdDropDownList.DataValueField = "ProductoId"; ProductoIdDropDownList.DataTextField = "Nombre"; ProductoIdDropDownList.AppendDataBoundItems = true; ProductoIdDropDownList.DataBind(); }