asp Repeater ItemTemplate - eval whole object
Posted
by
Tomasz Bitowt
on Stack Overflow
See other posts from Stack Overflow
or by Tomasz Bitowt
Published on 2014-06-02T09:21:26Z
Indexed on
2014/06/02
9:24 UTC
Read the original article
Hit count: 215
Currently I am using asp:Repeater like this:
<asp:Repeater ID="itemsRepeater" runat="server">
<ItemTemplate>
<my:Button runat="server" Title='<%# DataBinder.Eval(Container.DataItem, "Title") %>' />
</ItemTemplate>
</asp:Repeater>
But now, I would like to send whole model to my:Button control like:
<asp:Repeater ID="itemsRepeater" runat="server">
<ItemTemplate>
<my:TabListButton runat="server" Mode;='<%# this %>' />
</ItemTemplate>
</asp:Repeater>
Could you tell me how to handle that?
© Stack Overflow or respective owner