Repeater里的Label问题
我在Repeater控件的HeaderTemplate里放了个table,tr的td里有个服务器控件Label,我想在.cs里拿到这个Label,代码如下:
string editionType = this.Request.QueryString[ "EditionType "]);
Deliver deliver = new Deliver();
this.RepeaterConcreteEdition.DataSource = deliver.GetDeliverByEditionType(editionType);
this.RepeaterConcreteEdition.DataBind();
foreach (RepeaterItem item in this.RepeaterConcreteEdition.Items)
{
Label label = item.FindControl( "LabelEditionName ") as Label;
if (label != null)
label.Text = editionType;
}
怎么不行啊
------解决方案--------------------RepeaterItem item in this.RepeaterConcreteEdition.Items
===>
RepeaterItem item in this.RepeaterConcreteEdition.Controls