protected void bindProductList() { DataTableConversion lsttodt = new DataTableConversion(); IProductRepository repository = new ProductRepository(); var lst = repository.ProductLists().Select(x => new { x.Name, x.ID }).ToList(); DataTable dt = lsttodt.ToDataTable(lst); if (dt != null && dt.Rows.Count > 0) { ProductID.DataSource = dt; ProductID.DataTextField = "Name"; ProductID.DataValueField = "ID"; ProductID.DataBind(); } else { ProductID.DataBind(); } }