.net中如何从后台获取repeater中的文本框的值

2024-12-03 17:06:56
推荐回答(2个)
回答1:

foreach (RepeaterItem item in this.rpt.Items)
{
TextBox txt= item.FindControl("txtID") as TextBox ;
string str= txt.Text;
}

回答2:

foreach (RepeaterItem item in Repeater1.Items)
{
TextBox ckb = (TextBox)item.FindControl("TextBox");
}