首页 > 代码库 > repeater嵌套repeater

repeater嵌套repeater

  1. protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
    {
    Repeater rpWindows = e.Item.FindControl("Repeater2") as Repeater;
    HiddenField hfMenuID = e.Item.FindControl("hfMenuID") as HiddenField;

    string strMenuID = hfMenuID.Value.ToString().Trim();

    rpWindows.DataSource = new shoppingData().SelectAllInproduct(strMenuID);
    rpWindows.DataBind();

    }}

repeater嵌套repeater