Posted on: 8/12/2013 4:29:22 PM | Views : 277

I have this code below and I need to set the DataTextField and the DataValueFields, how do I format my strings correctly? Will bind to list box.
CODE   int startYear = 2009;   List<int> years = new List<int>();   for (int year = startYear; year <= DateTime.Now.Year; year++)    {      years.Add(year);      }                 this.ckBxYear.DataSource = years;    this.ckBxYear.DataTextField = Convert.ToString(years.ToString());   <-- this is throwing an error    this.ckBxYear.Dat ...

Go to the complete details ...