首页 > 其他 > 详细

Repeater绑定List泛型对象

时间:2014-10-20 16:41:39      阅读:271      评论:0      收藏:0      [点我收藏+]

后台:

 

public void BindData()
        {
            List<WeiBo> DataList = new List<WeiBo>();
            DataList = DBTools.GetPublishedWeiBo(user._id.ToString());
            Repeater_PubData.DataSource = DataList;
            Repeater_PubData.DataBind();
        }

 

 

前台:

 

  <asp:Repeater ID="Repeater_PubData" runat="server">
                <ItemTemplate>
                  <div class="contentItemKuang">
                    <div class="leftFace">
                        <img src="../Images/face.jpg" width="50px" height="50px" />
                    </div>
                    <div class="RightFont">
                        <%#((Model.WeiBo)Container.DataItem).Message %>
                        <p class="content_footer">
                            3月18日23:15 <span class="itemAction">转发 | 评论</span>
                        </p>
                    </div>
                </div>
                </ItemTemplate>
                </asp:Repeater>

Repeater绑定List泛型对象

原文:http://www.cnblogs.com/Xujg/p/4037176.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!