你好!
目测好像问题有点纠结,不是很好改!所以只能推荐你改改代码,实现一样的功能了:
前台的绑定位置
<%# Eval("id") %> | <%# Eval("name") %> | <%# Eval("age") %> | | 后台的绑定事件
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HtmlTableCell td1 = e.Item.FindControl("td1") as HtmlTableCell;
HtmlTableCell td2 = e.Item.FindControl("td2") as HtmlTableCell;
if (td1.InnerText == "李四")
{
td2.InnerText = "李四";
}
else if (td1.InnerText == "张三")
{
td2.InnerText = "张三";
}
else if (td1.InnerText == "王静")
{
td2.InnerText = "王静";
}
}
}
这样就可以达到你要的效果的了!