Repeater嵌套绑定Repeater
2009-02-26 12:05
344 查看
Repeater嵌套Repeater的结构:一般写过的都能看懂吧
cs代码:
<table border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 5px" width="100%">
<asp:Repeater runat="server" ID="rptypelist" OnItemDataBound="rptypelist_ItemDataBound">
<ItemTemplate>
<tr>
<td class="fb">
<a href="Lists.aspx?Qtid=<%#Eval("qtid") %>"><%#Eval("qtypename") %></a> <span id="askCount_15"
class="date2">[<%#Eval("typecount")%>]</span>
</td>
</tr>
<tr>
<td>
<div id="askTop2_15" class="ask_list">
<asp:Repeater runat="server" ID="rpquestionlist">
<ItemTemplate>
<a href="Question.aspx?qid=<%#Eval("liftquestionid")%>">
<%#Eval("questiontitle")%></a><br />
</ItemTemplate>
</asp:Repeater>
</div>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
此方法应该适合于repeater嵌套,datalist嵌套。
(datalist嵌套前不久试过,也可以)
cs代码:
<table border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 5px" width="100%">
<asp:Repeater runat="server" ID="rptypelist" OnItemDataBound="rptypelist_ItemDataBound">
<ItemTemplate>
<tr>
<td class="fb">
<a href="Lists.aspx?Qtid=<%#Eval("qtid") %>"><%#Eval("qtypename") %></a> <span id="askCount_15"
class="date2">[<%#Eval("typecount")%>]</span>
</td>
</tr>
<tr>
<td>
<div id="askTop2_15" class="ask_list">
<asp:Repeater runat="server" ID="rpquestionlist">
<ItemTemplate>
<a href="Question.aspx?qid=<%#Eval("liftquestionid")%>">
<%#Eval("questiontitle")%></a><br />
</ItemTemplate>
</asp:Repeater>
</div>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
此方法应该适合于repeater嵌套,datalist嵌套。
(datalist嵌套前不久试过,也可以)
相关文章推荐
- Repeater如何嵌套绑定数据?
- Repeater中嵌套repeater实现大类别中的小类表绑定。
- Repeater嵌套绑定数据 实现大类下的小类
- Repeater嵌套绑定Repeater以及内层调用外层数据
- Repeater嵌套绑定Repeater
- Repeater嵌套绑定Repeater
- Repeater嵌套绑定Repeater
- Repeater嵌套Repeater获取父级绑定项
- Repeater嵌套绑定Repeater
- Repeater嵌套绑定Repeater
- Repeater嵌套绑定Repeater
- Repeater嵌套绑定Repeater
- repeater的手写代码绑定,实现分页和嵌套
- 使用嵌套的repeater实现权限信息三级目录的绑定
- asp.net中Repeater嵌套绑定的方法(使用两个Repeater做子类别绑定)
- Asp.net 嵌套数据绑定 repeater 主从数据嵌套【转】
- asp.net中Repeater嵌套绑定的方法(使用两个Repeater做子类别绑定)
- asp.net asp:Repeater嵌套绑定方法(1)
- repeater简单应用(嵌套绑定)
- Repeater 嵌套绑定数据