repeater中嵌套repeater的问题
前台<asp:RepeaterID="Repeater1"runat="server"OnItemDataBound="Repeater1_ItemDataBound">...
前台
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
<ItemTemplate>
<%# Eval("title")%>
<%--嵌套一个Repeater5--%>
<asp:Label ID="lbl_IDD" runat="server" Text='<%# Eval("id") %>' Visible="False"></asp:Label>
<asp:Repeater ID="Repeater5" runat="server" >
<ItemTemplate>
<%-- <hr width="100%" size="1" color="#CCCCCC">--%>
<fieldset>
<%#Eval("title")%>
</fieldset>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
后台
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
successclassbll scb = new successclassbll();
successbll sb = new successbll();
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater Repeater5_CS = null;
Label PD_IDD_CS = new Label();
Repeater5_CS = (Repeater)e.Item.FindControl("Repeater5");
if (Repeater5_CS != null)
{
PD_IDD_CS = (Label)e.Item.FindControl("lbl_IDD");
Repeater1.DataSource = scb.successclass_all();
Repeater1.DataBind();
Repeater5_CS.DataSource = sb.success_all_cid(Convert.ToInt32(PD_IDD_CS));
Repeater5_CS.DataBind();
}
}
}
怎么没数据显示啊! 展开
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
<ItemTemplate>
<%# Eval("title")%>
<%--嵌套一个Repeater5--%>
<asp:Label ID="lbl_IDD" runat="server" Text='<%# Eval("id") %>' Visible="False"></asp:Label>
<asp:Repeater ID="Repeater5" runat="server" >
<ItemTemplate>
<%-- <hr width="100%" size="1" color="#CCCCCC">--%>
<fieldset>
<%#Eval("title")%>
</fieldset>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
后台
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
successclassbll scb = new successclassbll();
successbll sb = new successbll();
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater Repeater5_CS = null;
Label PD_IDD_CS = new Label();
Repeater5_CS = (Repeater)e.Item.FindControl("Repeater5");
if (Repeater5_CS != null)
{
PD_IDD_CS = (Label)e.Item.FindControl("lbl_IDD");
Repeater1.DataSource = scb.successclass_all();
Repeater1.DataBind();
Repeater5_CS.DataSource = sb.success_all_cid(Convert.ToInt32(PD_IDD_CS));
Repeater5_CS.DataBind();
}
}
}
怎么没数据显示啊! 展开
1个回答
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询