asp.net怎样在页面加载是找到repeater中的linkbutton
展开全部
public static linkbutton Getlinkbutton(Repeater repeater, string key)
{
LinkButton btn
for (int i = 0; i < repeater.Items.Count; i++)
{
btn = repeater.Items[i].FindControl(key) as LinkButton;
break
}
return btn;
}
//遍历的话用foreach好点!!!!
{
LinkButton btn
for (int i = 0; i < repeater.Items.Count; i++)
{
btn = repeater.Items[i].FindControl(key) as LinkButton;
break
}
return btn;
}
//遍历的话用foreach好点!!!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询