zoukankan      html  css  js  c++  java
  • Repeater绑定List泛型对象

    后台:

    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>

  • 相关阅读:
    Vue源码学习之双向绑定
    Vue源码学习之数据初始化
    JavaScript跨域资源请求(CORS)解决方案
    Vue学习笔记
    MongoDB学习笔记
    实现一个类似bootstrap的多级下拉菜单
    bootstrap栅格系统的实现
    滑动效果的标签页切换
    一个简单的类似Vue的双向绑定
    元素垂直居中的常见方法
  • 原文地址:https://www.cnblogs.com/Xujg/p/4037176.html
Copyright © 2011-2022 走看看