protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { //假设在第一层里面嵌套了一个名叫Repeater2 的 var temp = e.Item.FindControl("Repeater2") as Repeater; temp.ItemDataBound += new RepeaterItemEventHandler(temp_ItemDataBound); } void temp_ItemDataBound(object sender, RepeaterItemEventArgs e) { //假设在第二层里面嵌套了一个名叫Repeater3的 var temp = e.Item.FindControl("Repeater3") as Repeater; temp.ItemDataBound += new RepeaterItemEventHandler(temp_ItemDataBound1); } void temp_ItemDataBound1(object sender, RepeaterItemEventArgs e) { //..以此类推 } |
|