I have a CheckBoxList that I want to populate using a collection of ListItems with Text and Values defined.
var temp = types.Select(x => new ListItem(x["Description"].ToString(), x["TypeCode"].ToString()));
chbox.DataSource = temp;
chbox.DataBind();
The ListItems in temp have the correct Text and Value property values, but after chbox.DataBind(), all of the Value properties are populated with the Text property value.
So if the ListItems in temp look like
Text Value
LetterA A
LetterB B
The ListItems in chbox.Items look like
Text Value
LetterA LetterA
LetterB LetterB