I’m getting this error at running time:
Exception Details: System.InvalidOperationException: Unhandled binding type: ListBinding
- Choice_A, _b,_C are strings
- ‘Choices’ is List
var qs = (from questions in dc.Survey_Questions
where questions.Survey_ID == surveyid
select new SQuestions
{
QuestionID = questions.Question_ID,
Description = questions.Description,
Choice_A = questions.Choice_A,
Choice_B = questions.Choice_B,
Choice_C = questions.Choice_C,
**Choices = {questions.Choice_A, questions.Choice_B,
questions.Choice_C}**
}).ToList();
Basically I’d like to know how I assign to List Choices values of Choice_A,Choice_B, Choice_C.
Thanks in advance.
You can try this. If you already have the following two classes