I have asp:datalist binding from table this table contain two columns one of them string and the other is list<string>
I am binding the string value in <div> and I want to bind the list<string> in asp:CheckBoxList How Can I do this in html or .cs ?
this is html part
<asp:DataList ID="feedbacklist" RepeatDirection="Vertical" runat="server" Width="100%">
<ItemTemplate>
<div class="rowstyle2" style="width: auto">
<%# Eval("Question")%>
</div>
<div class="news_des">
<asp:CheckBoxList ID="answerslist" runat="server" RepeatDirection="Horizontal" Width="100px">
</asp:CheckBoxList>
</div>
</ItemTemplate>
</asp:DataList>
this is c# part in page load
List<string> boollist = new List<string>();
List<string> stringlist = new List<string>();
boollist.Add("Yes");
boollist.Add("No");
stringlist.Add("1");
stringlist.Add("2");
stringlist.Add("3");
DataTable test = new DataTable();
test.Columns.Add("Question", typeof(string));
test.Columns.Add("Answers", typeof(List<string>));
test.Rows.Add("What do you think of our new website?", boollist);
test.Rows.Add("What do you think so?", stringlist);
feedbacklist.DataSource = test;
feedbacklist.DataBind();