List<string> 绑定Repeater

实际上就是使用 <%#((string)Container.DataItem) %>
List<string> sign = new List<string> { tmodel.Signature1, tmodel.Signature2, tmodel.Signature3 };
                repSign.DataSource = sign;
                repSign.DataBind();

<asp:Repeater ID="repSign" runat="server">

  <ItemTemplate>

  <label><input type="radio" name="sign" value='<%#((string)Container.DataItem) %>'/><%#((string)Container.DataItem)%></label>

</ItemTemplate>

</asp:Repeater>

posted @ 2013-03-06 16:16  梨花驿路  阅读(299)  评论(0编辑  收藏  举报