I have a DropDown list I am trying to pupulate from a DataTable. Each row contains the short date, and the second column contains the month name followed by the year.
Something like this:
6/11/2011 June 2011
7/11/2011 July 2011
I am trying to throw the second column into a drop down list.
dateListDropDown.DataSource = DateList.Rows.Select(x=> x[1].ToString());
dateListDropDown.DataBind();
But I don’t think I have the Linq correct.
Can anyone see what I am doing wrong here?
Try this:
OR