Repeater 嵌套用法
前台:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<li>
<a href="#"><%# Eval("MENU_NAME")%> +</a>
<ul>
<asp:Repeater ID="Repeater2" DataSource='<%#menubiz.Select_ZiCanDan_Biz(Convert.ToInt32(Eval("PARENT_ID").ToString()))%>' runat="server">
<ItemTemplate>
<li><a href="index/Send_Index.aspx?page=<%# Eval("PAGE_NAME")%>" target="_blank"><%# Eval("MENU_NAME")%></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
</ItemTemplate>
</asp:Repeater>
后台:
protected User_AllMenu_BIZ menubiz = new User_AllMenu_BIZ();//创建biz 调用方法
public void tankuang()
{
Repeater1.DataSource = menubiz.Select_OneMenu_Biz();
Repeater1.DataBind();
}