So, I have two lists with the same type of objects. One of the list contains every single object of that type from the database. The other list contains only objects that have a specific ID.
I have a repeater which lists all objects from the first list in one column, and checkboxes for each item in the second column. What I'm trying to do now is to automatically check the checkboxes for items that are members in both lists, meaning that if an item in list2 also exists in list1, then the checkbox next to that item in the Table should be checked.
I've been searching for a solution for hours now with no luck, and I'm hoping someone can help me with this.
Thanks in advance!
This is the frontend code:
<asp:Repeater runat="server" ID="BegreppRepeater">
<HeaderTemplate>
<table class="adminObjectsTable">
<th>Begrepp</th>
<th></th>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem, "name") %></td>
<td><input type="checkbox" name="checkbox1" value=""></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>