这可能是一个愚蠢的问题,但我正在编写一个快速的测试页面,并意识到我不知道如何绑定一个数组或ArrayList的字符串,例如到一个ASP.NET中继器.
我试了一下
<asp:Repeater ID="rptimages" runat="server"> <HeaderTemplate> <h3>Items</h3> </HeaderTemplate> <ItemTemplate> <p style="background-color:Black;color:White"><%#Eval(Container.DataItem.ToString())%></p> </ItemTemplate> <FooterTemplate> <h4>End of Items</h4> </FooterTemplate> </asp:Repeater>
我是完全愚蠢的吗?我只是真的把它用于具有属性的对象的集合.
解决方法
hoho …
<%# Container.DataItem %>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。