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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With