Repeater.Controls 属性
定义
获取 ControlCollection,其中包含 Repeater 控件的子控件。Gets a ControlCollection that contains the child controls of the Repeater control.
public:
virtual property System::Web::UI::ControlCollection ^ Controls { System::Web::UI::ControlCollection ^ get(); };
public override System.Web.UI.ControlCollection Controls { get; }
member this.Controls : System.Web.UI.ControlCollection
Public Overrides ReadOnly Property Controls As ControlCollection
属性值
一个 ControlCollection,它包含 Repeater 控件的子控件。A ControlCollection that contains the child controls of the Repeater control.
注解
使用 Controls 集合来管理控件的子控件 Repeater 。Use the Controls collection to manage the child controls of the Repeater control. 它通常用于从集合中检索子控件。It is commonly used to retrieve a child control from the collection. 您还可以在集合中添加和移除子控件。You can also add and remove child controls from the collection.
备注
若要访问控件中的子控件 Repeater ,请循环访问 Repeater 控件的 Items 集合,以检索 RepeaterItem 给定索引的。To access a child control within a Repeater control, iterate through the Repeater control's Items collection to retrieve the RepeaterItem for a given index. 然后调用 Repeater 项的继承 FindControl 方法来检索具有特定 ID 的控件。Then call the Repeater item's inherited FindControl method to retrieve a control with a particular ID.