I have the following asp:Repeater setup:
<asp:Repeater runat="server" id="ArticleInfoRepeater">
<ItemTemplate>
<div class="col-md-9" style="margin-top: 30px;">
<h2><%#: Eval("Title") %></h2>
<div style="margin-top:10px;">
<%#: Eval("Content") %>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
and I want to populate it using a List<> that is returned when an item from a select list is selected.
My problem is, how do I set the Eval value. I have seen this question Understanding ASP.NET Eval() and Bind() but is it really the case that I have to create a whole new class just to set these 2 simple values? I know that is a fairly simple task, but it seems rather drastic just to set 2 variables.
If not, how do I set these 2 values? The list I am trying to use to populate the fields has properties corresponding the name of the eval field.
I assume after that I will use a for loop to populate them? But I guess I need a command to then make it populate the field, or will the assignment of the Eval value automatically populate the field each time?
There is really no clear instructions on how to achieve my goal, which I think is a fairly simple and straight forward goal.