Okay, so I looked up some cool stuff about strongly typed repeater controls... the only issue is that it won\'t work. I have a List
that I\'ve boun
You need to bind data in code behind like below:
using (MicroGOVEntities entities = DataEntitiesFactory.GetInstance())
{
var getGovernments = from g in entities.S_Government
orderby g.DateCreated descending
select g;
rpData.DataSource = getGovernments.ToList();
}
rpData.DataBind();
And the ASP.NET code is:
<asp:Repeater ID="rpData" runat="server"
ItemType="MicroGOV.Entity.S_Government"
OnItemCommand="rpData_ItemCommand">
<ItemTemplate>
<td><%#:Item.GovernmentID %></td>
</ItemTemplate>
</asp:Repeater>