当前位置:编程学习 > C#/ASP.NET >>

asp.net 生成静态的问题

<asp:Repeater ID="rptypelist" runat="server">
                    <ItemTemplate>
                        <div class="list">
                            <div class="list-icon">
                                <img src="<%#Eval("userPic") %>" alt="头像"></div>
                            <div class="list-topic">
                                <div class="list-name">
                                    <%#Eval("username")%>
                                    <span class="list-name-time">
                                        <%#Eval("userTime")%></span></div>
                                <div class="list-detail">
                                    <%#Eval("usertxt")%></div>
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>



如上:上面是一个数据区域,我想把他生成静态html。因为懒,想用原来动态的页面标签做替换
但是碰到这个数据列表,如果做一个标签的话,那么 数据列表有很多种,怎么能 动态循环替换呢???就像Repeater 一样! --------------------编程问答-------------------- 我想到一个就是吧这个数据区域  单独提取出来放在一个模板内,,,,然后读取数据库去循环,然后替换一个大标签!!!还有别的简单办法么
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,