ObjectDataSource.GetViewNames ObjectDataSource.GetViewNames ObjectDataSource.GetViewNames ObjectDataSource.GetViewNames Method

定义

检索名称的集合,这些名称表示与 ObjectDataSource 对象关联的视图对象的列表。Retrieves a collection of names representing the list of view objects that are associated with the ObjectDataSource object.

protected:
 override System::Collections::ICollection ^ GetViewNames();
protected override System.Collections.ICollection GetViewNames ();
override this.GetViewNames : unit -> System.Collections.ICollection
Protected Overrides Function GetViewNames () As ICollection

返回

包含视图名称的 ICollection,这些视图与 ObjectDataSource 关联。An ICollection that contains the names of the views associated with the ObjectDataSource.

注解

控件在其基础数据上仅支持DefaultView一个名为的视图。 ObjectDataSourceThe ObjectDataSource control supports only one view, named DefaultView, on its underlying data. GetViewNames方法返回这一个视图名称的单元素集合。The GetViewNames method returns a single-element collection of this one view name.

GetViewNames方法旨在由数据绑定控件 (而不是页代码) 进行调用。The GetViewNames method is intended to be called by data-bound controls, not by page code.

适用于

另请参阅