62,267
社区成员
发帖
与我相关
我的任务
分享
protected void rptBoards_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem rptItem = e.Item;
DataRow dtRow = ((DataRowView)rptItem.DataItem).Row;
// 相关数据行数据
string strName = dtRow.Field<string>("name");
// 查找相关项中控件并设置Text属性
TextBox tb1 = rptItem.FindControl("tb1") as TextBox;
tb1.Text=strName;
}