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 集合以检索给定索引的 RepeaterItemTo 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.

适用于

另请参阅