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)
{
//..以此類推
}