Reputation: 3061
I'm trying to use model binding feature of asp.net 4.5. I'm using Repeater control, seting ModelType property on it, but as soon as I run the application, I'm getting parser error, which states, that Repeater doesn't have ModelType public property. Here's markup
<ul>
<asp:Repeater ID="rptDepartments" runat="server" ModelType="TestWebApp.Models.Department">
<ItemTemplate>
<li>
<%#: Item.DeptName %>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
Any ideas ? I saw plenty of examples of using Model Binding in conjuction with repeater control in the web.
I'm using VS 2012 RC.
Upvotes: 7
Views: 2968
Reputation: 37785
It looks like the ModelType property got renamed to ItemType see http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.repeater.itemtype(v=vs.110).aspx for more info.
Upvotes: 9