protected void RepService_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
//DataBinder.Eval(e.Item.DataItem, "数据库字段")
//int i = Convert.ToInt32(Databinder.Eval(e.Item.DataItem,"ID"));
RepeaterItem item = e.Item;
string summary = DataBinder.Eval(e.Item.DataItem, "summary").ToString();
LinkButton LinkBtnExam = e.Item.FindControl("LinkBtnExam") as LinkButton;
if (string.IsNullOrEmpty(summary))
{
LinkBtnExam.Enabled = false;
}
}
}
ItemDataBound 事件中获取行的值
最新推荐文章于 2024-08-14 11:10:56 发布