7

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.

Michael
  • 2,961
  • 2
  • 28
  • 54

1 Answers1

9

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.

Gloopy
  • 37,767
  • 15
  • 103
  • 71