语言

ListView.Controls 属性

定义

获取一个 ControlCollection 对象,该对象表示控件的 ListView 子控件。

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

属性值

控件的子控件 ListView 集合。

注解

该 Controls 属性替代基本实现。 这可以保证在属性返回 ControlCollection 对象之前创建了所有子控件。

通过此属性 Controls ,你可以以编程方式访问控件的 ControlCollection 类 ListView 实例。 可以将控件添加到集合、从集合中删除控件,或循环访问集合中的服务器控件。

若要访问该控件的特定子控件 ListView ,可以使用 FindControl 该方法。

适用于

另请参阅